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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
boolean
int
getCost()
int
getDelay()
getKey()
getPath()
int
float
byte
int
hashCode()
replacePath
(List<ConnectedEdge> list) setCost
(int cost) setDelay
(int delay) setPathLength
(float length) setPathStatus
(byte status) setPredecessor
(Long vertexId) toString()
-
Field Details
-
UNKNOWN
public static final byte UNKNOWN- See Also:
-
ACTIVE
public static final byte ACTIVE- See Also:
-
SELECTED
public static final byte SELECTED- See Also:
-
DOMINATED
public static final byte DOMINATED- See Also:
-
PROCESSED
public static final byte PROCESSED- See Also:
-
-
Constructor Details
-
CspfPath
-
-
Method Details
-
getVertex
-
getVertexKey
-
setCost
-
getCost
public int getCost() -
setDelay
-
getDelay
public int getDelay() -
addConnectedEdge
-
replacePath
-
getPath
-
getPathCount
public int getPathCount() -
setPathStatus
-
getPathStatus
public byte getPathStatus() -
setPredecessor
-
getPredecessor
-
setPathLength
-
getPathLength
public float getPathLength() -
clearPath
public void clearPath() -
setKey
-
getKey
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CspfPath>
-
equals
-
hashCode
public int hashCode() -
toString
-