com.singularsys.aa
Class UntypifiedExpr

java.lang.Object
  extended by com.singularsys.aa.SimpleExpr
      extended by com.singularsys.aa.UntypifiedExpr
All Implemented Interfaces:
Expression

public class UntypifiedExpr
extends SimpleExpr


Field Summary
 
Fields inherited from class com.singularsys.aa.SimpleExpr
variables
 
Constructor Summary
UntypifiedExpr(org.nfunk.jep.Node topNode_in)
           
 
Method Summary
 org.nfunk.jep.Node getTopNode()
           
 java.lang.Object getValue(java.util.Hashtable values)
          Evaluates the equation at a specific point determined by the values Hashtable.
 boolean isPolynomial()
          Returns true if this equation is a polynomial
 LinearExpr linearCheck()
          Determines whether this equation is linear.
 PolynomialExpr polynomialCheck()
          Determines whether this equation is a polynomial.
 void setTopNode(org.nfunk.jep.Node topNode_in)
          Sets the top node of the expression tree describing the equation.
 boolean substitute(java.lang.String varName, java.lang.Object constant)
           
 boolean substitute(java.lang.String varName, java.lang.Object constant, Substituter subsy)
           
 java.lang.String toString()
           
 
Methods inherited from class com.singularsys.aa.SimpleExpr
getValue, getVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UntypifiedExpr

public UntypifiedExpr(org.nfunk.jep.Node topNode_in)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setTopNode

public void setTopNode(org.nfunk.jep.Node topNode_in)
Sets the top node of the expression tree describing the equation.


getTopNode

public org.nfunk.jep.Node getTopNode()

toString

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

getValue

public java.lang.Object getValue(java.util.Hashtable values)
                          throws java.lang.Exception
Evaluates the equation at a specific point determined by the values Hashtable.

Specified by:
getValue in interface Expression
Overrides:
getValue in class SimpleExpr
Parameters:
values - A hastable containing the variable names as keys, and the values as objects.
Returns:
The value of this expression.
Throws:
java.lang.Exception

polynomialCheck

public PolynomialExpr polynomialCheck()
Determines whether this equation is a polynomial. Returns the polynomial representation if applicable, null otherwise.


isPolynomial

public boolean isPolynomial()
Returns true if this equation is a polynomial


linearCheck

public LinearExpr linearCheck()
Determines whether this equation is linear. The equation must have first been determined to be a polynomial with polynomialCheck.


substitute

public boolean substitute(java.lang.String varName,
                          java.lang.Object constant)

substitute

public boolean substitute(java.lang.String varName,
                          java.lang.Object constant,
                          Substituter subsy)