- Notifications
You must be signed in to change notification settings - Fork1.9k
Open
Description
/** 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;
Metadata
Metadata
Assignees
Labels
No labels