Package game
Class Edge
java.lang.Object
game.Edge
An Edge represents an immutable directed, weighted edge.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
length
public final int lengthThe length of this edge
-
-
Constructor Details
-
Edge
Constructor: an edge from src to dest with length length. -
Edge
Constructor: an edge that is isomorphic to iso.
-
-
Method Details
-
getOther
Return the Node on this Edge that is not equal to n. Throw an IllegalArgumentException if n is not in this Edge. -
length
public int length()Return the length of thisEdge
-
source
Return the source of this edge. -
destination
Return destination of edge
-