net.sourceforge.combean.graph.alg.lp
Class EdgesAsLPConstraintSequence
java.lang.Object
net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
net.sourceforge.combean.graph.alg.lp.EdgesAsLPConstraintSequence
- All Implemented Interfaces:
- LPConstraintSequence
public class EdgesAsLPConstraintSequence
- extends AbstractLPConstraintSequence
- implements LPConstraintSequence
An LPConstraintSequence which contains one constraint per edge in a graph
with numbered edges. All constraints have the same relation symbol.
EdgesAsLPConstraintSequence
public EdgesAsLPConstraintSequence(String offsetId,
GlobalNumberedEdgesGraphProp numberedEdges)
- Constructor
- Parameters:
numberedEdges
- the graph for which the edges shall be turned
into LP variables.
getNumConstrs
public int getNumConstrs()
- Description copied from interface:
LPConstraintSequence
- Get the number of elements in the sequence.
- Specified by:
getNumConstrs
in interface LPConstraintSequence
- Returns:
- the number of elements in the sequence.
getLPConstraint
public LPConstraint getLPConstraint(int localRow)
- Description copied from interface:
LPConstraintSequence
- Get the constraint for a given (local) row index.
- Specified by:
getLPConstraint
in interface LPConstraintSequence
- Parameters:
localRow
- a local row index.
- Returns:
- the corresponding LP constraint.
setEdgeRhs
public final void setEdgeRhs(FixedDoubleEdgeMap edgeRhs)
- Parameters:
edgeRhs
- The edgeRhs to set.
setRelation
public final void setRelation(byte relation)
- Parameters:
relation
- The relation to set.