net.sourceforge.combean.graph.alg.lp
Class NodesAsLPConstraintSequence
java.lang.Object
net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
net.sourceforge.combean.graph.alg.lp.NodesAsLPConstraintSequence
- All Implemented Interfaces:
- LPConstraintSequence
public class NodesAsLPConstraintSequence
- extends AbstractLPConstraintSequence
- implements LPConstraintSequence
An LPConstraintSequence which contains one constraint per node in a graph
with numbered nodes. All constraints have the same relation symbol.
NodesAsLPConstraintSequence
public NodesAsLPConstraintSequence(String offsetId,
GlobalNumberedNodesGraphProp numberedNodes)
- Constructor
- Parameters:
numberedNodes - 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.
setNodeRhs
public final void setNodeRhs(FixedDoubleNodeMap nodeRhs)
- Parameters:
nodeRhs - The nodeRhs to set.
setRelation
public final void setRelation(byte relation)
- Parameters:
relation - The relation to set.