net.sourceforge.combean.mathprog.lp.model
Class DoubleLPConstraintSequence

Package class diagram package DoubleLPConstraintSequence
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPConstraintSequence
      extended by net.sourceforge.combean.mathprog.lp.model.DoubleLPConstraintSequence
All Implemented Interfaces:
LPConstraintSequence

public class DoubleLPConstraintSequence
extends AbstractLPConstraintSequence
implements LPConstraintSequence

A simple implementation of a constraint sequence, consisting of DoubleLPConstraints.


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPConstraintSequence
OFFSET_UNDEFINED
 
Constructor Summary
DoubleLPConstraintSequence(String offsetId, byte relation, double[] rhs)
          Constructor for a constraint sequence with a uniform relation symbol.
DoubleLPConstraintSequence(String offsetId, int length)
          Constructor for a sequence of undefined constraints (all elements are initialized to null)
 
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 setLPConstraint(int localRow, LPConstraint value)
          Set an individual LP constraint in the sequence.
 
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

DoubleLPConstraintSequence

public DoubleLPConstraintSequence(String offsetId,
                                  int length)
Constructor for a sequence of undefined constraints (all elements are initialized to null)

Parameters:
length - the length of the sequence to be constructed.

DoubleLPConstraintSequence

public DoubleLPConstraintSequence(String offsetId,
                                  byte relation,
                                  double[] rhs)
Constructor for a constraint sequence with a uniform relation symbol.

Parameters:
relation - the uniform relation symbol.
rhs - an array containing the right-hand side of all constraints in the sequence.
Method Detail

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.

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.

setLPConstraint

public void setLPConstraint(int localRow,
                            LPConstraint value)
Set an individual LP constraint in the sequence.

Parameters:
localRow - the index of the LP constraint to be set.
value - the value to set.