|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object structure.Edge structure.ComparableEdge
public class ComparableEdge
A class implementing common edge type among graphs. This class supports both directed and undirected edges. Edge may also have visited flags set and cleared.
Graph
Constructor Summary | |
---|---|
ComparableEdge(Edge e)
Construct a (possibly directed) edge between two labeled vertices. |
|
ComparableEdge(Object vtx1,
Object vtx2,
Object label,
boolean directed)
Construct a (possibly directed) edge between two labeled vertices. |
Method Summary | |
---|---|
int |
compareTo(Object other)
Compare edge, based on labels. |
String |
toString()
Construct a string representation of edge. |
Methods inherited from class structure.Edge |
---|
equals, hashCode, here, isDirected, isVisited, label, reset, setLabel, there, visit |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComparableEdge(Object vtx1, Object vtx2, Object label, boolean directed)
vtx1
- The label of a vertex (source if directed).vtx2
- The label of another vertex (destination if directed).label
- The label associated with the edge.directed
- True iff this edge is directed.public ComparableEdge(Edge e)
e
- The edge to be used as the basis for a comparable edgeMethod Detail |
---|
public int compareTo(Object other)
compareTo
in interface Comparable
public String toString()
toString
in class Edge
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |