|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--lu.cs.co.graph.Edge
This abstract class defines and provides fields and methods for an edge in a graph. The class is cannot be instantiated but is extended by DirectedEdge and UndirectedEdge, which can.
| Field Summary | |
int |
len
The edge's length. |
Vertex |
u
The first vertex incident to the edge. |
Vertex |
v
The second vertex incident to the edge. |
| Method Summary | |
Object |
clone()
Returns a clone of this edge. |
int |
compareTo(Edge e)
Compares the length of two edges. |
int |
compareTo(Object o)
Compares this edge to another object. |
Vertex |
neighbour(Vertex v)
The neighbour of a given vertex on this edge. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public Vertex u
public Vertex v
public int len
| Method Detail |
public Object clone()
public Vertex neighbour(Vertex v)
public String toString()
public int compareTo(Object o)
o - the Object to be comparedpublic int compareTo(Edge e)
e - the edge to be compared
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||