Package org.opendaylight.algo.impl
Class CspfPath
- java.lang.Object
-
- org.opendaylight.algo.impl.CspfPath
-
- All Implemented Interfaces:
Comparable<CspfPath>
public class CspfPath extends Object implements 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
-
-
Constructor Summary
Constructors Constructor Description CspfPath(ConnectedVertex vertex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CspfPath
addConnectedEdge(ConnectedEdge edge)
void
clearPath()
int
compareTo(CspfPath other)
boolean
equals(Object object)
int
getCost()
int
getDelay()
Integer
getKey()
List<ConnectedEdge>
getPath()
int
getPathCount()
float
getPathLength()
byte
getPathStatus()
Long
getPredecessor()
ConnectedVertex
getVertex()
Long
getVertexKey()
int
hashCode()
CspfPath
replacePath(List<ConnectedEdge> list)
CspfPath
setCost(int cost)
CspfPath
setDelay(int delay)
CspfPath
setKey(Integer key)
CspfPath
setPathLength(float length)
CspfPath
setPathStatus(byte status)
CspfPath
setPredecessor(Long vertexId)
String
toString()
-
-
-
Field Detail
-
UNKNOWN
public static final byte UNKNOWN
- See Also:
- Constant Field Values
-
ACTIVE
public static final byte ACTIVE
- See Also:
- Constant Field Values
-
SELECTED
public static final byte SELECTED
- See Also:
- Constant Field Values
-
DOMINATED
public static final byte DOMINATED
- See Also:
- Constant Field Values
-
PROCESSED
public static final byte PROCESSED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CspfPath
public CspfPath(ConnectedVertex vertex)
-
-
Method Detail
-
getVertex
public ConnectedVertex getVertex()
-
getVertexKey
public Long getVertexKey()
-
setCost
public CspfPath setCost(int cost)
-
getCost
public int getCost()
-
setDelay
public CspfPath setDelay(int delay)
-
getDelay
public int getDelay()
-
addConnectedEdge
public CspfPath addConnectedEdge(ConnectedEdge edge)
-
replacePath
public CspfPath replacePath(List<ConnectedEdge> list)
-
getPath
public List<ConnectedEdge> getPath()
-
getPathCount
public int getPathCount()
-
setPathStatus
public CspfPath setPathStatus(byte status)
-
getPathStatus
public byte getPathStatus()
-
getPredecessor
public Long getPredecessor()
-
setPathLength
public CspfPath setPathLength(float length)
-
getPathLength
public float getPathLength()
-
clearPath
public void clearPath()
-
getKey
public Integer getKey()
-
compareTo
public int compareTo(CspfPath other)
- Specified by:
compareTo
in interfaceComparable<CspfPath>
-
-