Class Node

java.lang.Object
  |
  +--Node

public class Node
extends java.lang.Object

A representation of a node. Created: Fri Mar 31 09:16:17 2000


Constructor Summary
Node(java.lang.String name, int rankLaTeX)
          Creates a new Node.
 
Method Summary
 Edge anyInEdge()
          Returns a random incoming edge.
 Edge anyOutEdge()
          Returns a random outgoing edge.
 int inDegree()
          Get the number of incoming edges.
 java.util.Enumeration inEdges()
          Get the incoming edges.
 int outDegree()
          Get the number of outgoing edges.
 java.util.Enumeration outEdges()
          Get the outgoing edges.
 java.lang.String toString()
          The string representation is just the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.String name,
            int rankLaTeX)
Creates a new Node.
Parameters:
name - You can give each node a name. This name can be very handy when debugging. O(1).
Method Detail

outEdges

public java.util.Enumeration outEdges()
Get the outgoing edges.
Returns:
an enumeration of all the edges going out of this node. O(1).

anyOutEdge

public Edge anyOutEdge()
Returns a random outgoing edge.
Returns:
an outgoing edge. O(1).

inEdges

public java.util.Enumeration inEdges()
Get the incoming edges.
Returns:
an enumeration of all the edges going in to this node. O(1).

anyInEdge

public Edge anyInEdge()
Returns a random incoming edge.
Returns:
an incoming edge. O(1).

inDegree

public int inDegree()
Get the number of incoming edges.
Returns:
the number of edges going into this node. O(1).

outDegree

public int outDegree()
Get the number of outgoing edges.
Returns:
the number of edges going out of this node. O(1)

toString

public java.lang.String toString()
The string representation is just the given name. O(1)
Overrides:
toString in class java.lang.Object