net.sourceforge.combean.mathprog.grooml
Class GConstraint

The rhs of a row in an LP. Simple data holder that implements LPConstraint. Some parsing functionality for the construction of constraint objects.

Field Summary
 String name
           
 Map relSyms
           
 byte relation
           
 double rhs
           
 
Constructor Summary
GConstraint(String name, byte relation, double rhs)
            Construct a constraint.
GConstraint(String name, String constrDef)
            Construct a constraint from a String definition.
 
Method Summary
String getName()
          
String getRelSym()
          
byte getRelation()
          
double getRhs()
          
void setName(String name)
          
String toString()
          
String toSummaryString()
          
 

Constructor Detail

GConstraint

public GConstraint(String name, byte relation, double rhs)
Construct a constraint.
params:
name the name of the constraint
params:
relation the relation symbol of the constraint
params:
rhs the value on the rhs of the constraint


GConstraint

public GConstraint(String name, String constrDef)
Construct a constraint from a String definition.
params:
name the name of the constraint
params:
constrDef the definition of the constraint with the format
" ", e.g. "<= 1.0". The relation symbols =, >= and <= are supported.


Method Detail

getName

public String getName()


getRelSym

public String getRelSym()
returns:
the relation as relation symbol (e.g. '<=')


getRelation

public byte getRelation()


getRhs

public double getRhs()


setName

public void setName(String name)


toString

public String toString()


toSummaryString

public String toSummaryString()