Class AhujaOrlinSharmaCyclicExchangeLocalAugmentation.LabeledPath<V>
java.lang.Object
org.jgrapht.alg.cycle.AhujaOrlinSharmaCyclicExchangeLocalAugmentation.LabeledPath<V>
- Type Parameters:
V- the vertex type
- All Implemented Interfaces:
Cloneable
- Enclosing class:
AhujaOrlinSharmaCyclicExchangeLocalAugmentation<V,E>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLabeledPath(ArrayList<V> vertices, double cost, HashSet<Integer> labels) Constructs a LabeledPath with the given inputs -
Method Summary
-
Field Details
-
vertices
-
labels
-
cost
public double costthe cost of the path
-
-
Constructor Details
-
LabeledPath
Constructs a LabeledPath with the given inputs- Parameters:
vertices- the vertices of the path in order of the pathcost- the cost of the edges connecting the verticeslabels- the mapping of the vertices to labels (subsets)
-
-
Method Details
-
addVertex
Adds a vertex to the path- Parameters:
v- the vertexedgeCost- the cost of the edge connecting the last vertex of the path and the new vertexlabel- the label of the new vertex
-
getHead
-
getTail
-
isEmpty
public boolean isEmpty()Returns whether the path is empty, i.e. has no vertices- Returns:
- whether the path is empty
-
clone
Returns a shallow copy of this labeled path instance. Vertices are not cloned.- Overrides:
clonein classObject- Returns:
- a shallow copy of this path.
- Throws:
RuntimeException- in case the clone is not supported- See Also:
-