net.sourceforge.combean.mathprog.lp
Class DoubleLPVariable

Package class diagram package DoubleLPVariable
java.lang.Object
  extended by net.sourceforge.combean.mathprog.lp.DoubleLPVariable
All Implemented Interfaces:
NamedObject, LPVariable

public class DoubleLPVariable
extends Object
implements LPVariable

A linear variable with representation based on plain Java doubles.


Constructor Summary
DoubleLPVariable(double coeff)
          Constructor for an unbounded variable.
DoubleLPVariable(double coeff, double lowerBound, double upperBound)
          Constructor for a bounded variable
DoubleLPVariable(String name, double coeff)
          Constructor for an unbounded variable.
DoubleLPVariable(String name, double coeff, double lowerBound, double upperBound)
          Constructor for a bounded variable
 
Method Summary
 double getCoeff()
          Get coefficient of the variable.
 double getLowerBound()
          Get lower bound of interval of admissible values for variable.
 String getName()
           
 double getUpperBound()
          Get upper bound of interval of admissible values for variable.
 void setName(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleLPVariable

public DoubleLPVariable(double coeff)
Constructor for an unbounded variable.

Parameters:
coeff - the coefficient in the objective function.

DoubleLPVariable

public DoubleLPVariable(double coeff,
                        double lowerBound,
                        double upperBound)
Constructor for a bounded variable

Parameters:
coeff - the coefficient in the objective function.
lowerBound - the lower bound of the variable
upperBound - the upper bound of the variable

DoubleLPVariable

public DoubleLPVariable(String name,
                        double coeff)
Constructor for an unbounded variable.

Parameters:
name - the name of the variable.
coeff - the coefficient in the objective function.

DoubleLPVariable

public DoubleLPVariable(String name,
                        double coeff,
                        double lowerBound,
                        double upperBound)
Constructor for a bounded variable

Parameters:
name - the name of the variable.
coeff - the coefficient in the objective function.
lowerBound - the lower bound of the variable
upperBound - the upper bound of the variable
Method Detail

getCoeff

public double getCoeff()
Description copied from interface: LPVariable
Get coefficient of the variable.

Specified by:
getCoeff in interface LPVariable
Returns:
coefficient of the variable.

getLowerBound

public double getLowerBound()
Description copied from interface: LPVariable
Get lower bound of interval of admissible values for variable.

Specified by:
getLowerBound in interface LPVariable
Returns:
lower bound of box constraint.

getUpperBound

public double getUpperBound()
Description copied from interface: LPVariable
Get upper bound of interval of admissible values for variable.

Specified by:
getUpperBound in interface LPVariable
Returns:
upper bound of box constraint.

getName

public String getName()
Specified by:
getName in interface NamedObject
Returns:
the name of the object.

setName

public void setName(String name)
Parameters:
name - The name to set.

toString

public String toString()
Overrides:
toString in class Object