|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.alsUtility.Mark
gov.nasa.javaGenes.graph.GraphElement
gov.nasa.javaGenes.graph.Edge
Edges in Graphs. An edge connects two vertices.
Graph
,
Vertex
,
Serialized FormField Summary | |
protected Vertex[] |
vertices
the vertices this edge connects |
Constructor Summary | |
Edge()
|
Method Summary | |
boolean |
canAcceptVerticesOf(Edge e)
|
java.lang.Object |
clone()
|
Vertex |
commonVertex(Edge edge)
|
boolean |
dissimilarEdgeCompatibleWithVertices(Edge e)
|
boolean |
doesConnect(Vertex v)
|
java.lang.String |
getTypeString()
|
Vertex |
getVertex(int which)
|
boolean |
isCompatible(Compatible c)
|
boolean |
isLegal()
|
boolean |
isSame(Edge e)
|
void |
makeCompatibleWithVertices()
Force this edge to be compatible with its vertices. |
Vertex |
otherVertex(Vertex v)
|
void |
removeVertices()
sets the vertices to null |
void |
replaceVertex(Vertex oldVertex,
Vertex newVertex)
replace oldVertex with newVertex |
void |
setVertices(Vertex v1,
Vertex v2)
removes existing vertices removes "this" from edge list of existing vertices sets the vertices forces itself to be compatible (subclass responsibility) |
Edge |
shallowCopyEdge()
|
void |
stealVertices(Edge e)
|
java.lang.String |
toString()
|
Methods inherited from class gov.nasa.alsUtility.Mark |
getMark, isMarked, setMark |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Vertex[] vertices
Constructor Detail |
public Edge()
Method Detail |
public Edge shallowCopyEdge()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public void setVertices(Vertex v1, Vertex v2)
public void makeCompatibleWithVertices()
public void removeVertices()
public void stealVertices(Edge e)
e
- will lose its vertices! Be careful using it after this call.public void replaceVertex(Vertex oldVertex, Vertex newVertex)
public Vertex otherVertex(Vertex v)
v
- one of the vertices this edge connects
public Vertex commonVertex(Edge edge)
public java.lang.String getTypeString()
public java.lang.String toString()
public Vertex getVertex(int which)
public boolean isCompatible(Compatible c)
isCompatible
in interface Compatible
public boolean isSame(Edge e)
public boolean dissimilarEdgeCompatibleWithVertices(Edge e)
public boolean canAcceptVerticesOf(Edge e)
public boolean doesConnect(Vertex v)
public boolean isLegal()
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |