javaslam.tjt.graph
Class Edge

java.lang.Object
  |
  +--javaslam.tjt.graph.Edge
Direct Known Subclasses:
JunctionTree.JTEdge

public class Edge
extends Object

A directed edge in a graph.


Field Summary
 Node from
          The start of this edge.
 Node to
          The end of this edge.
 
Constructor Summary
Edge(Node from, Node to)
          Default constructor.
 
Method Summary
 boolean equals(Object o)
          Redefines equals so that two edges are equal if their termini are the equal.
 int hashCode()
          Redefines hashCode so the hash code of an edge is the sum of the hash codes of its nodes.
 String toString()
          Returns a string representation of this edge.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

from

public Node from
The start of this edge.


to

public Node to
The end of this edge.

Constructor Detail

Edge

public Edge(Node from,
            Node to)
Default constructor. The edge is built and added to the from node's list of incident edges.

Method Detail

equals

public boolean equals(Object o)
Redefines equals so that two edges are equal if their termini are the equal.

Overrides:
equals in class Object

hashCode

public int hashCode()
Redefines hashCode so the hash code of an edge is the sum of the hash codes of its nodes.

Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representation of this edge.

Overrides:
toString in class Object