|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hermit.geometry.Graph
public class Graph
An immutable graph, with possibly infinite edges.
This immutable class represents a graph as a collection of Edge objects. These edges can be infinite.
Constructor Summary | |
---|---|
Graph(java.util.HashSet<Edge> e)
Construct a graph with a given set of edges. |
Method Summary | |
---|---|
void |
dump(java.lang.String prefix)
Dump the entire set of edges in this graph to the console. |
Edge[] |
getEdgeArray()
Get an array of the edges in the graph. |
java.util.Iterator<Edge> |
getEdges()
Get the edges in the graph. |
int |
getNumEdges()
Get the number of edges in the graph. |
int |
getNumVertices()
Get the number of vertices in the graph. |
Point[] |
getVertexArray()
Get an array of the vertices in the graph. |
java.util.Iterator<Point> |
getVertices()
Get the vertices in the graph. |
java.lang.String |
toString()
Convert this instance to a String suitable for display. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Graph(java.util.HashSet<Edge> e)
e
- The set of edges which define the graph.
May include infinite edges.Method Detail |
---|
public int getNumEdges()
public java.util.Iterator<Edge> getEdges()
public Edge[] getEdgeArray()
public int getNumVertices()
public java.util.Iterator<Point> getVertices()
public Point[] getVertexArray()
public java.lang.String toString()
toString
in class java.lang.Object
public void dump(java.lang.String prefix)
prefix
- Prefix for each output line.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |