DataStructures
Class WeightedGraph.Arc

java.lang.Object
  |
  +--DataStructures.WeightedGraph.Arc
Enclosing class:
WeightedGraph

public static class WeightedGraph.Arc
extends java.lang.Object

A public class returned by the arcs() iteration over arcs. It represents an arc as a (tail, head, weight) triple, where tail and head are node labels and weight is an int.

See Also:
WeightedGraph.arcs()

Method Summary
 java.lang.Object head()
          Returns the head or destination of this arc.
 java.lang.Object tail()
          Returns the tail or source of this arc.
 int weight()
          Returns the weight attached to this arc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

tail

public java.lang.Object tail()
Returns the tail or source of this arc.
Returns:
the tail of the arc.

head

public java.lang.Object head()
Returns the head or destination of this arc.
Returns:
the head of the arc.

weight

public int weight()
Returns the weight attached to this arc.
Returns:
the weight of the arc.