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
-
DirectedEdge()
- The default constructor is not to be used, since a directed edge
must have a given start and end vertex.
-
DirectedEdge(Vertex, Vertex)
- Constructs a directed edge with the given start and end vertices.
-
DirectedEdge(Vertex, Vertex, double)
- Constructs a directed edge with the given start and end
vertices, and the initial weight.
-
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.
-
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.
-
head()
- Returns the vertex at the head of this directed edge (the
vertex to which this directed edge leads).
-
tail()
- Returns the vertex at the tail of this directed edge (the
vertex from which this directed edge originates).
-
traverseFrom(Vertex)
- Traverses this directed edge from a given vertex, returning the
destination vertex.
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.
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.
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.
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.
DirectedEdge
protected DirectedEdge()
- The default constructor is not to be used, since a directed edge
must have a given start and end vertex.
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.
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.
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