|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.synth.graph.NamedObject
byucc.jhdl.synth.graph.Vertex
Represents a vertex in a graph. This data structure contains a list of all edges which leave this vertex and all edges which enter this vertex. Users may want to subclass this object to provide a Vertex with properites (i.e. distance, etc.).
Field Summary | |
protected EdgeVector |
inEdgeVector
This object contains a list of all Edges in which this Vertex object is the head (or "sink" of the edge). |
protected EdgeVector |
outEdgeVector
This object contains a list of all Edges in which this Vertex object is the tail (or "source" of the edge). |
protected Graph |
parent
The Graph object to which this vertex belongs. |
protected int |
visited
A flag used for marking vertices as they are traversed. |
Fields inherited from class byucc.jhdl.synth.graph.NamedObject |
name |
Constructor Summary | |
Vertex(Graph g)
Construct a new unnamed Vertex belonging to the given graph. |
|
Vertex(Graph g,
java.lang.String name)
Construct a new named Vertex belonging to the given graph. |
Method Summary | |
protected Edge |
findEdgeTo(Vertex head)
Find the edge going from this vertex to the vertex head. |
EdgeIterator |
getInEdges()
Get a GenericIterator of all inEdges to this Vertex. |
EdgeIterator |
getOutEdges()
Get a GenericIterator of all outEdges from this Vertex. |
Graph |
getParent()
Get the Graph to which this Vertex belongs. |
Vertex |
getSingleHead()
Get the vertex which is the head of the single output edge to this vertex. |
Vertex |
getSingleTail()
Get the vertex which is the tail of the single input edge to this vertex. |
int |
getVisited()
|
int |
inDegree()
Get the in-degree of this vertex. |
boolean |
isAdjacent(Vertex tail)
Is this Vertex adjacent to the given Vertex. |
boolean |
isVisited()
Has this vertex been visited? |
int |
outDegree()
Get the out-degree of this vertex. |
void |
resetVisit()
Clear the visited attribute on this vertex, (subsequent calls to isVisited will return false. |
void |
setProperty(java.lang.String key,
java.lang.String value)
|
java.lang.String |
toDot()
|
java.lang.String |
toString()
Generate a String representation of this object. |
protected java.lang.String |
vertexDotLabels()
|
protected java.lang.String |
vertexDotProperties()
|
void |
visit()
Mark this node as visited, (subsequent calls to isVisited will return true.) |
void |
visit(int i)
|
Methods inherited from class byucc.jhdl.synth.graph.NamedObject |
getName, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Graph parent
protected EdgeVector outEdgeVector
protected EdgeVector inEdgeVector
protected int visited
Constructor Detail |
public Vertex(Graph g)
g
- The graph to which this vertex belongs.public Vertex(Graph g, java.lang.String name)
g
- The graph to which this vertex belongs.name
- The name for this vertex.Method Detail |
public Graph getParent()
public boolean isVisited()
public void resetVisit()
public void visit()
public void visit(int i)
public int getVisited()
public boolean isAdjacent(Vertex tail)
tail
- The vertex to be tested for adjacency.
protected Edge findEdgeTo(Vertex head)
head
- the vertex that is the head of the desired edge
Graph.getEdge(byucc.jhdl.synth.graph.Vertex, byucc.jhdl.synth.graph.Vertex)
public EdgeIterator getOutEdges()
public int outDegree()
public EdgeIterator getInEdges()
public int inDegree()
public Vertex getSingleTail()
public Vertex getSingleHead()
public void setProperty(java.lang.String key, java.lang.String value)
protected java.lang.String vertexDotProperties()
protected java.lang.String vertexDotLabels()
public final java.lang.String toDot()
public java.lang.String toString()
toString
in class NamedObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |