net.sourceforge.combean.mathprog.lp
Class DoubleLPConstraint

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

public class DoubleLPConstraint
extends Object
implements LPConstraint

A linear constraint with representation based on plain Java doubles.


Field Summary
 
Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.LPConstraint
REL_COUNT, REL_EQUAL, REL_GREATER, REL_LESS, REL_UNDEFINED
 
Constructor Summary
DoubleLPConstraint(byte relation, double rhs)
          Constructor for an unnamed constraint
DoubleLPConstraint(String name, byte relation, double rhs)
          Constructor of a named constraint
 
Method Summary
 String getName()
           
 byte getRelation()
          Return relation symbol
 double getRhs()
          Get value of right-hand side.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleLPConstraint

public DoubleLPConstraint(byte relation,
                          double rhs)
Constructor for an unnamed constraint

Parameters:
relation - the relation
rhs - the right-hand side

DoubleLPConstraint

public DoubleLPConstraint(String name,
                          byte relation,
                          double rhs)
Constructor of a named constraint

Parameters:
name - the name of the constraint
relation - the relation
rhs - the right-hand side
Method Detail

getRelation

public byte getRelation()
Description copied from interface: LPConstraint
Return relation symbol

Specified by:
getRelation in interface LPConstraint
Returns:
code for relation symbol

getRhs

public double getRhs()
Description copied from interface: LPConstraint
Get value of right-hand side.

Specified by:
getRhs in interface LPConstraint
Returns:
value of right-hand side.

getName

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

toString

public String toString()
Overrides:
toString in class Object