You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Deep copies **/
public Graph(Graph<T> g) {
type = g.getType();
// Copy the vertices which also copies the edges
for (Vertex<T> v : g.getVertices())
this.allVertices.add(new Vertex<T>(v));
for (Vertex<T> v : this.getVertices()) {
for (Edge<T> e : v.getEdges()) {
this.allEdges.add(e);
}
}
}
I don't think it‘s a Deep copies. Although those new Vertices have associated with those Edges, but Edges still associated with old Vertices;
The text was updated successfully, but these errors were encountered:
I don't think it‘s a Deep copies. Although those new Vertices have associated with those Edges, but Edges still associated with old Vertices;
The text was updated successfully, but these errors were encountered: