net.sourceforge.combean.graph.alg.lp
Class LPModelSolverAsFixedDoubleEdgeMap
java.lang.Object
net.sourceforge.combean.graph.alg.lp.LPModelSolverAsFixedDoubleEdgeMap
- All Implemented Interfaces:
- FixedDoubleEdgeMap
public class LPModelSolverAsFixedDoubleEdgeMap
- extends Object
- implements FixedDoubleEdgeMap
Wrap a LP model modelSolver as fixed double edge map, which returns the primal
solution value for each edge.
This is useful for LPs where a part of the variables correspond to settings
for the edges in a graph.
Method Summary |
double |
getDouble(Edge e)
Return the value for a given edge. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LPModelSolverAsFixedDoubleEdgeMap
public LPModelSolverAsFixedDoubleEdgeMap(LPModelSolver solver,
GlobalNumberedEdgesGraphProp numberedEdges,
String offsetId)
- Constructor
- Parameters:
solver
- the LP model modelSolver to be wrapped. The LP model must
contain the edges of the graph for which the edge map is accessed.numberedEdges
- the graph to which the edge map refers.offsetId
- the offset identifier for the columns in the LP model
which correspond to the edges in the given graph.
getDouble
public double getDouble(Edge e)
- Description copied from interface:
FixedDoubleEdgeMap
- Return the value for a given edge.
- Specified by:
getDouble
in interface FixedDoubleEdgeMap
- Parameters:
e
- the edge for which the value shall be returned.
- Returns:
- the value stored in the map for e.