Package org.opendaylight.algo.impl
Class CspfPath
java.lang.Object
org.opendaylight.algo.impl.CspfPath
- All Implemented Interfaces:
Comparable<CspfPath>
This Class implements the Constrained Shortest Path First (CSPF) Path stored in the Priority Queue used by various
Path Computation Algorithms.
The path corresponds to the computed path between the Source Vertex and the Current Vertex. Cost (based on TE Metric) and Delay are accumulated values from the source to the current vertex.
The class uses standard java "Comparable" interface to support "natural ordering" and thus implements the compareTo() method based on the "key" value. However, the equals() method uses Vertex Key for comparison. HashCode() method is also overridden by the Connected Vertex hashCode() method.
- Author:
- Olivier Dugeon
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPath(List<ConnectedEdge> list) voidintbooleanintgetCost()intgetDelay()getKey()getPath()intfloatinthashCode()replacePath(List<ConnectedEdge> list) setCost(int cost) setDelay(int delay) setPathLength(float length) setPredecessor(Long vertexId) setStatus(CspfPath.CspfPathStatus status) toString()
-
Constructor Details
-
CspfPath
-
CspfPath
-
-
Method Details
-
getVertex
-
getSource
-
getVertexKey
-
setCost
-
getCost
public int getCost() -
setDelay
-
getDelay
public int getDelay() -
addConnectedEdge
-
addPath
-
replacePath
-
getPath
-
getPathCount
public int getPathCount() -
setStatus
-
getStatus
-
setPredecessor
-
getPredecessor
-
setPathLength
-
getPathLength
public float getPathLength() -
clearPath
public void clearPath() -
setKey
-
getKey
-
compareTo
- Specified by:
compareToin interfaceComparable<CspfPath>
-
equals
-
hashCode
public int hashCode() -
toString
-