All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class rpi.goldsd.graph.DirectedEdge

java.lang.Object
   |
   +----rpi.goldsd.graph.Edge
           |
           +----rpi.goldsd.graph.DirectedEdge

public class DirectedEdge
extends Edge
The DirectedEdge class is used to represent a directed edge.

Version:
2.0, 4/19/98
Author:
David Goldschmidt
See Also:
GraphBase, Edge

Constructor Index

 o DirectedEdge()
The default constructor is not to be used, since a directed edge must have a given start and end vertex.
 o DirectedEdge(Vertex, Vertex)
Constructs a directed edge with the given start and end vertices.
 o DirectedEdge(Vertex, Vertex, double)
Constructs a directed edge with the given start and end vertices, and the initial weight.
 o DirectedEdge(Vertex, Vertex, Hashable)
Constructs a directed edge with the given start and end vertices, and the initial Hashable object to be associated with this directed edge.
 o DirectedEdge(Vertex, Vertex, Hashable, double)
Constructs a directed edge with the given start and end vertices, the initial Hashable object to be associated with this directed edge, and the initial weight.

Method Index

 o head()
Returns the vertex at the head of this directed edge (the vertex to which this directed edge leads).
 o tail()
Returns the vertex at the tail of this directed edge (the vertex from which this directed edge originates).
 o traverseFrom(Vertex)
Traverses this directed edge from a given vertex, returning the destination vertex.

Constructors

 o DirectedEdge
 public DirectedEdge(Vertex startVertex,
                     Vertex endVertex,
                     Hashable data,
                     double weight)
Constructs a directed edge with the given start and end vertices, the initial Hashable object to be associated with this directed edge, and the initial weight.

Parameters:
startVertex - the vertex from which this directed edge originates.
endVertex - the vertex to which this directed edge leads.
data - the Hashable object to be associated with this directed edge.
weight - the initial weight of this directed edge.
 o DirectedEdge
 public DirectedEdge(Vertex startVertex,
                     Vertex endVertex,
                     double weight)
Constructs a directed edge with the given start and end vertices, and the initial weight.

Parameters:
startVertex - the vertex from which this directed edge originates.
endVertex - the vertex to which this directed edge leads.
weight - the initial weight of this directed edge.
 o DirectedEdge
 public DirectedEdge(Vertex startVertex,
                     Vertex endVertex,
                     Hashable data)
Constructs a directed edge with the given start and end vertices, and the initial Hashable object to be associated with this directed edge.

Parameters:
startVertex - the vertex from which this directed edge originates.
endVertex - the vertex to which this directed edge leads.
data - the Hashable object to be associated with this directed edge.
 o DirectedEdge
 public DirectedEdge(Vertex startVertex,
                     Vertex endVertex)
Constructs a directed edge with the given start and end vertices.

Parameters:
startVertex - the vertex from which this directed edge originates.
endVertex - the vertex to which this directed edge leads.
 o DirectedEdge
 protected DirectedEdge()
The default constructor is not to be used, since a directed edge must have a given start and end vertex.

Methods

 o head
 public Vertex head()
Returns the vertex at the head of this directed edge (the vertex to which this directed edge leads).

Returns:
the vertex to which this directed edge leads.
 o tail
 public Vertex tail()
Returns the vertex at the tail of this directed edge (the vertex from which this directed edge originates).

Returns:
the vertex from which this directed edge originates.
 o traverseFrom
 public Vertex traverseFrom(Vertex V)
Traverses this directed edge from a given vertex, returning the destination vertex.

Parameters:
V - the vertex from which the traversal begins.
Returns:
the vertex that this directed edge leads to; or null if V is not the tail of this directed edge.
Overrides:
traverseFrom in class Edge

All Packages  Class Hierarchy  This Package  Previous  Next  Index