public class DirectedShortestPathVertex<E extends ShortestPathEdgeData> extends DirectedEdgeDataVertex<E> implements ShortestPathVertex<E>
DEFAULT_WEIGHT
Constructor and Description |
---|
DirectedShortestPathVertex(EdgeDataFactory<E> edgeDataFactory) |
Modifier and Type | Method and Description |
---|---|
double |
getEdgeWeight(EdgeWeightVertex<E> to)
Retrieve the weight of the edge from the calling vertex to the vertex passed
as parameter.
|
ChildVertex |
getParent()
Get the vertex's parent
|
double |
getWeight()
Retrieve a vertex's weight.
|
void |
setEdgeWeight(EdgeWeightVertex<E> to,
double weight)
Set the weight of the edge from the calling vertex to the vertex passed
as parameter.
|
void |
setParent(ChildVertex parent)
Set the parent of the given vertex
|
void |
setWeight(double weight)
Set vertex weight to the specified value.
|
addAdjacency, adjacencyCount, clearAdjacencies, containsAdjacency, getAdjacencies, getEdgeData, hasAdjacencies, removeAdjacency
equals, getGraph, setGraph
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEdgeData
addAdjacency, adjacencyCount, clearAdjacencies, containsAdjacency, getAdjacencies, getGraph, hasAdjacencies, removeAdjacency, setGraph
public DirectedShortestPathVertex(EdgeDataFactory<E> edgeDataFactory)
public void setEdgeWeight(EdgeWeightVertex<E> to, double weight)
EdgeWeightVertex
setEdgeWeight
in interface EdgeWeightVertex<E extends ShortestPathEdgeData>
to
- head of the edge for which to set the weightweight
- value to which the edge's weight is to be setpublic final double getEdgeWeight(EdgeWeightVertex<E> to)
EdgeWeightVertex
getEdgeWeight
in interface EdgeWeightVertex<E extends ShortestPathEdgeData>
to
- head of the edge for which to get the weightpublic final void setParent(ChildVertex parent)
ChildVertex
setParent
in interface ChildVertex
parent
- vertex to be set as parentpublic final ChildVertex getParent()
ChildVertex
getParent
in interface ChildVertex
public final void setWeight(double weight)
WeightedVertex
setWeight
in interface WeightedVertex
weight
- value to which to set the vertex weightpublic final double getWeight()
WeightedVertex
getWeight
in interface WeightedVertex