public class GenericGraph<T extends Edge> extends AbstractGraph<T,GenericEdgeSet<T>>
AbstractGraph.Subgraph
Constructor and Description |
---|
GenericGraph() |
GenericGraph(Graph<? extends T> g)
Creates a new
GenericGraph with a copy of all the edges and
vertices contained within g |
Modifier and Type | Method and Description |
---|---|
Graph<T> |
copy(Set<Integer> vertices)
Creates a copy of this graph containing only the specified number of
vertices and all edges between those vertices.
|
protected GenericEdgeSet<T> |
createEdgeSet(int vertex)
Returns a
EdgeSet that will be used to store the edges of the
specified vertex |
add, add, clear, clearEdges, contains, contains, contains, degree, edges, equals, getAdjacencyList, getEdges, getEdgeSet, getNeighbors, hasCycles, hashCode, iterator, order, remove, remove, size, subgraph, toString, vertices
public Graph<T> copy(Set<Integer> vertices)
vertices
is
empty a new, empty graph of this instance's type is returned. Any
changes made to this graph will not be reflected in returned copy or
vice-versa.protected GenericEdgeSet<T> createEdgeSet(int vertex)
AbstractGraph
EdgeSet
that will be used to store the edges of the
specified vertexcreateEdgeSet
in class AbstractGraph<T extends Edge,GenericEdgeSet<T extends Edge>>
Copyright © 2012. All Rights Reserved.