|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quilt.graph.Vertex
A vertex in a directed graph.
Field Summary | |
protected Connector |
connector
Connects this vertex to one or more other vertices. |
protected Directed |
graph
The graph this vertex belongs to. |
protected int |
index
Unique non-negative assigned to the Vertex; -1 means 'unassigned' |
protected java.lang.String |
label_
Optional label. |
Constructor Summary | |
protected |
Vertex()
Creates a vertex without an index and belonging to no graph. |
|
Vertex(Directed g)
Creates a vertex belonging to a graph, assigns an index unique within this graph. |
Method Summary | |
boolean |
above(Directed g)
Is the graph a parent, grandparent of this vertex? |
static void |
checkForNull(java.lang.Object o,
java.lang.String what)
Throw an exception if the argument is null. |
Connector |
getConnector()
|
Edge |
getEdge()
|
Directed |
getGraph()
Get the graph this vertex is in. |
int |
getIndex()
|
java.lang.String |
getLabel()
|
Vertex |
getTarget()
|
Edge |
makeBinary()
Convert the existing connector to a BinaryConnector. |
ComplexConnector |
makeComplex(int n)
Convert the exiting connector to a ComplexConnector, using the existing Edge as seed. |
MultiConnector |
makeMulti(int n)
Convert the exiting connector to a MultiConnector, using the existing Edge as seed. |
void |
setConnector(Connector c)
|
void |
setLabel(java.lang.String s)
Assign a label to the Vertex. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int index
protected Directed graph
protected Connector connector
protected java.lang.String label_
Constructor Detail |
protected Vertex()
public Vertex(Directed g)
g
- The graph the vertex belongs to.Method Detail |
public Connector getConnector()
public void setConnector(Connector c)
public Edge getEdge()
public Vertex getTarget()
public Directed getGraph()
public int getIndex()
public java.lang.String getLabel()
public void setLabel(java.lang.String s)
public Edge makeBinary()
public ComplexConnector makeComplex(int n)
public MultiConnector makeMulti(int n)
public boolean above(Directed g)
g
- Candidate progenitor.
public static void checkForNull(java.lang.Object o, java.lang.String what)
o
- Argument being checkedwhat
- What it is - for error message.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |