edu.harvard.econcs.jopt.solver.mip
Class Constraint

java.lang.Object
  extended by edu.harvard.econcs.jopt.solver.mip.Constraint
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Constraint
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Constructor Summary
Constraint(CompareType type, double constant)
           
 
Method Summary
 void addTerm(Term term)
           
 void addTerm(Variable var, double coefficient)
           
 boolean equals(java.lang.Object arg0)
           
 double getConstant()
           
 int getId()
           
 CompareType getType()
           
 int hashCode()
           
 java.util.Iterator iterator()
           
 java.lang.String prettyString()
           
 void setConstant(double constant)
           
 int size()
           
 java.util.Iterator sortedIterator()
           
 java.lang.String toString()
           
 Constraint typedClone()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Constraint

public Constraint(CompareType type,
                  double constant)
Parameters:
constTerm -
type -
Method Detail

getConstant

public double getConstant()
Returns:
Returns the constTerm.

getType

public CompareType getType()
Returns:
Returns the type.

addTerm

public void addTerm(Term term)
Parameters:
term -

addTerm

public void addTerm(Variable var,
                    double coefficient)

iterator

public java.util.Iterator iterator()
Returns:
Returns the exprTerms.

size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

sortedIterator

public java.util.Iterator sortedIterator()

prettyString

public java.lang.String prettyString()

setConstant

public void setConstant(double constant)
Parameters:
constant - The constant to set.

typedClone

public Constraint typedClone()

equals

public boolean equals(java.lang.Object arg0)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getId

public int getId()
Returns:
Returns the id.