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

Package class diagram package DoubleLPVariableSequence
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.model.AbstractLPVariableSequence
      extended by net.sourceforge.combean.mathprog.lp.model.DoubleLPVariableSequence
All Implemented Interfaces:
LPVariableSequence

public class DoubleLPVariableSequence
extends AbstractLPVariableSequence
implements LPVariableSequence

A variable sequence of DoubleLPVariable objects.


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.model.LPVariableSequence
OFFSET_UNDEFINED
 
Constructor Summary
DoubleLPVariableSequence(String offsetId, double[] coeffs)
          Construct a variable sequence of unbounded variables.
DoubleLPVariableSequence(String offsetId, double[] coeffs, double uniformLower, double uniformUpper)
          Construct a variable sequence of uniformly bounded variables
DoubleLPVariableSequence(String offsetId, int length)
          Construct an uninitialized variable sequence (all elements are null)
 
Method Summary
 LPVariable getLPVariable(int localColumn)
          Return the LP variable for a given local column index.
 int getNumVars()
          Get the number of elements in the sequence.
 void setLPVariable(int localColumn, LPVariable value)
          Change a variable in the sequence.
 
Methods inherited from class net.sourceforge.combean.mathprog.lp.model.AbstractLPVariableSequence
getColumnModelIndex, getVarOffset, getVarOffsetId, isInteger, setIntegerFlag, setVarOffset, setVarOffsetId, 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.LPVariableSequence
getVarOffset, getVarOffsetId, isInteger, setVarOffset, setVarOffsetId
 

Constructor Detail

DoubleLPVariableSequence

public DoubleLPVariableSequence(String offsetId,
                                int length)
Construct an uninitialized variable sequence (all elements are null)

Parameters:
length - the number of elements

DoubleLPVariableSequence

public DoubleLPVariableSequence(String offsetId,
                                double[] coeffs)
Construct a variable sequence of unbounded variables.

Parameters:
coeffs - the coefficients of the variables in the sequence.

DoubleLPVariableSequence

public DoubleLPVariableSequence(String offsetId,
                                double[] coeffs,
                                double uniformLower,
                                double uniformUpper)
Construct a variable sequence of uniformly bounded variables

Parameters:
coeffs - the coefficients of the variables in the sequence.
uniformLower - the lower bound for all variables.
uniformUpper - the upper bound for all variables.
Method Detail

getLPVariable

public LPVariable getLPVariable(int localColumn)
Description copied from interface: LPVariableSequence
Return the LP variable for a given local column index.

Specified by:
getLPVariable in interface LPVariableSequence
Parameters:
localColumn - the local column index.
Returns:
the correponding LP variable.

getNumVars

public int getNumVars()
Description copied from interface: LPVariableSequence
Get the number of elements in the sequence.

Specified by:
getNumVars in interface LPVariableSequence
Returns:
the number of elements in the sequence.

setLPVariable

public void setLPVariable(int localColumn,
                          LPVariable value)
Change a variable in the sequence.

Parameters:
localColumn - the local column index of the variable to be changed.
value - the new variable to set for the given column.