net.sourceforge.combean.graph.alg.lp
Class EdgesAsLPVariableSequence

Package class diagram package EdgesAsLPVariableSequence
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPVariableSequence
      extended by 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.


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence
OFFSET_UNDEFINED
 
Constructor Summary
EdgesAsLPVariableSequence(String offsetId, GlobalNumberedEdgesGraphProp numberedEdges)
          Constructor
 
Method Summary
 LPVariable getLPVariable(int localColumn)
          Return the LP variable for a given local column index.
 int getNumVars()
          Get the number of elements in the sequence.
 void setEdgeCost(FixedDoubleEdgeMap edgeCost)
           
 void setEdgeLowerBound(FixedDoubleEdgeMap edgeLowerBound)
           
 void setEdgeUpperBound(FixedDoubleEdgeMap edgeUpperBound)
           
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractLPVariableSequence
getColumnModelIndex, getVarOffset, getVarOffsetId, isInteger, setIntegerFlag, setVarOffset, setVarOffsetId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence
getVarOffset, getVarOffsetId, isInteger, setVarOffset, setVarOffsetId
 

Constructor Detail

EdgesAsLPVariableSequence

public EdgesAsLPVariableSequence(String offsetId,
                                 GlobalNumberedEdgesGraphProp numberedEdges)
Constructor

Parameters:
numberedEdges - the graph for which the edges shall be turned into LP variables.
Method Detail

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.