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

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


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence
OFFSET_UNDEFINED
 
Constructor Summary
NodesAsLPConstraintSequence(String offsetId, GlobalNumberedNodesGraphProp numberedNodes)
          Constructor
 
Method Summary
 LPConstraint getLPConstraint(int localRow)
          Get the constraint for a given (local) row index.
 int getNumConstrs()
          Get the number of elements in the sequence.
 void setNodeRhs(FixedDoubleNodeMap nodeRhs)
           
 void setRelation(byte relation)
           
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
getConstrOffset, getConstrOffsetId, getRowModelIndex, setConstrOffset, setConstrOffsetId, 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.LPConstraintSequence
getConstrOffset, getConstrOffsetId, setConstrOffset, setConstrOffsetId
 

Constructor Detail

NodesAsLPConstraintSequence

public NodesAsLPConstraintSequence(String offsetId,
                                   GlobalNumberedNodesGraphProp numberedNodes)
Constructor

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

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.