|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.aa.SimpleExpr
com.singularsys.aa.linear.LinearExpr
public class LinearExpr
Stores a linear expressions. These must be of the form:
constant + c1*v1 + c2*v2 + c3*v3 + ...where c1, c2, and c3 are the constant coefficients of the variables v1, v2, and v3 respectively.
Field Summary |
---|
Fields inherited from class com.singularsys.aa.SimpleExpr |
---|
variables |
Constructor Summary | |
---|---|
LinearExpr()
|
Method Summary | |
---|---|
void |
addCoefficient(java.lang.String name,
java.lang.Object value)
Adds a coefficient to the linear equation. |
java.lang.Object |
getCoefficient(java.lang.String name)
Returns the value of the coefficient for a variable specified by name. |
java.lang.Object |
getConstant()
Returns the constant value of the equation. |
java.lang.Object |
getValue(java.util.Hashtable varValues)
Returns the value of the expression given the variable values in |
boolean |
hasCoefficient(java.lang.String name)
Returns true if a variable "name" has a coefficient associated with it. |
void |
setConstant(java.lang.Object constant_in)
Sets the constant value of the linear equation |
Methods inherited from class com.singularsys.aa.SimpleExpr |
---|
getValue, getVariables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearExpr()
Method Detail |
---|
public void setConstant(java.lang.Object constant_in)
public java.lang.Object getConstant()
public void addCoefficient(java.lang.String name, java.lang.Object value)
public java.lang.Object getCoefficient(java.lang.String name)
public boolean hasCoefficient(java.lang.String name)
public java.lang.Object getValue(java.util.Hashtable varValues)
varValues.
getValue
in interface Expression
getValue
in class SimpleExpr
varValues
- A hastable containing the variable names as keys, and the
values as objects.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |