|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.linkmap.graph.impl.GraphImpl
public class GraphImpl
| Constructor Summary | |
|---|---|
GraphImpl()
Create a new, empty GraphImpl. |
|
GraphImpl(Collection<Vertex> vertices,
Collection<Edge> edges)
Create a new GraphImpl, copying the sets of Vertices and Edges from the specified sets. |
|
| Method Summary | |
|---|---|
void |
add(Edge edge)
|
void |
add(Vertex vertex)
|
void |
addEdges(Collection<? extends Edge> edges)
|
void |
addVertices(Collection<? extends Vertex> vertices)
|
boolean |
contains(Edge edge)
Returns whether this Graph contains the specified Edge. |
boolean |
contains(Vertex vertex)
Returns whether this Graph contains the specified Vertex. |
Collection<Graph> |
getConnectedSubgraphs()
Returns a set of Graphs containing disjoint subsets of the Vertices and Edges of this Graph, so that within each one of these Graphs there is a path between each pair of Vertices (ignoring directionality) but there are no paths to Vertices from other Graphs. |
Collection<Graph> |
getConnectedSubgraphs(Collection<Vertex> vertices,
Collection<Edge> edges)
Returns a set of Graphs containing disjoint subsets of the specified Vertices and Edges, so that within each one of these Graphs there is a path between each pair of Vertices (ignoring directionality) but there are no connections to Vertices from other Graphs. |
Collection<Edge> |
getEdges()
Returns the set of Edges of this Graph. |
Collection<Vertex> |
getVertices()
Returns the set of Vertices of this Graph. |
boolean |
isEmpty()
Returns whether this Graph contains no Vertices and Edges. |
String |
toString()
Returns a String containing a description of the contents of this Graph. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GraphImpl()
public GraphImpl(Collection<Vertex> vertices,
Collection<Edge> edges)
| Method Detail |
|---|
public void add(Vertex vertex)
public void addVertices(Collection<? extends Vertex> vertices)
public void add(Edge edge)
public void addEdges(Collection<? extends Edge> edges)
public Collection<Vertex> getVertices()
Graph
getVertices in interface Graphpublic Collection<Edge> getEdges()
Graph
getEdges in interface Graphpublic boolean isEmpty()
Graph
isEmpty in interface Graphpublic boolean contains(Vertex vertex)
Graph
contains in interface Graphpublic boolean contains(Edge edge)
Graph
contains in interface Graphpublic Collection<Graph> getConnectedSubgraphs()
Graph
getConnectedSubgraphs in interface Graph
public Collection<Graph> getConnectedSubgraphs(Collection<Vertex> vertices,
Collection<Edge> edges)
Graph
getConnectedSubgraphs in interface Graphpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||