net.sourceforge.combean.graph.alg.lp
Class EdgesAsLPVariableSequence
java.lang.Object
net.sourceforge.combean.mathprog.lp.model.AbstractLPVariableSequence
net.sourceforge.combean.graph.alg.lp.EdgesAsLPVariableSequence
- All Implemented Interfaces:
- LPVariableSequence
public class EdgesAsLPVariableSequence
- extends AbstractLPVariableSequence
- implements LPVariableSequence
An LPVariableSequence which contains one variable per edge in a graph
with numbered edges.
EdgesAsLPVariableSequence
public EdgesAsLPVariableSequence(String offsetId,
GlobalNumberedEdgesGraphProp numberedEdges)
- Constructor
- Parameters:
numberedEdges
- the graph for which the edges shall be turned
into LP variables.
getNumVars
public int getNumVars()
- Description copied from interface:
LPVariableSequence
- Get the number of elements in the sequence.
- Specified by:
getNumVars
in interface LPVariableSequence
- Returns:
- the number of elements in the sequence.
getLPVariable
public LPVariable getLPVariable(int localColumn)
- Description copied from interface:
LPVariableSequence
- Return the LP variable for a given local column index.
- Specified by:
getLPVariable
in interface LPVariableSequence
- Parameters:
localColumn
- the local column index.
- Returns:
- the correponding LP variable.
setEdgeCost
public final void setEdgeCost(FixedDoubleEdgeMap edgeCost)
- Parameters:
edgeCost
- The edgeCost to set.
setEdgeLowerBound
public final void setEdgeLowerBound(FixedDoubleEdgeMap edgeLowerBound)
- Parameters:
edgeLowerBound
- The edgeLowerBound to set.
setEdgeUpperBound
public final void setEdgeUpperBound(FixedDoubleEdgeMap edgeUpperBound)
- Parameters:
edgeUpperBound
- The edgeUpperBound to set.