JSci.maths.symbolic
Class Evaluation

java.lang.Object
  extended by JSci.maths.symbolic.Expression
      extended by JSci.maths.symbolic.Evaluation
All Implemented Interfaces:
java.io.Serializable, Field.Member, Ring.Member, AbelianGroup.Member, Member

public class Evaluation
extends Expression

This class associates a JSci.maths.analysis.RealFunction to an Expression argument, to generate an Expression.
This class will substitute the Function class.
See the main() for example.

See Also:
Serialized Form

Constructor Summary
Evaluation(RealFunction n, Expression a)
           
 
Method Summary
 Expression differentiate(Variable x)
          Differentiation of the expression with respect to a variable
 boolean equals(java.lang.Object o)
           
 Expression evaluate()
          This method substitutes the variable with the variable values, if non-null; they can be Contants or other Expressions.
 int getPriority()
          Get the priority of the operator described by the expression.
 java.lang.Object getSet()
           
static void main(java.lang.String[] args)
          An example
 java.lang.String toString()
           
 
Methods inherited from class JSci.maths.symbolic.Expression
add, difference, differentiate, divide, divide, inverse, inverse, multiply, negate, negative, power, product, product, rise, subtract, sum, sum
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Evaluation

public Evaluation(RealFunction n,
                  Expression a)
Parameters:
n - the function; for example,
a - the argument
Method Detail

toString

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

getPriority

public int getPriority()
Description copied from class: Expression
Get the priority of the operator described by the expression. This is needed only for allowing toString() to generate the parenthesis when needed.

Specified by:
getPriority in class Expression
Returns:
the priority

differentiate

public Expression differentiate(Variable x)
Description copied from class: Expression
Differentiation of the expression with respect to a variable

Specified by:
differentiate in class Expression
Parameters:
x - the variable

equals

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

getSet

public java.lang.Object getSet()

evaluate

public Expression evaluate()
Description copied from class: Expression
This method substitutes the variable with the variable values, if non-null; they can be Contants or other Expressions. Simplification is performed.

Specified by:
evaluate in class Expression
Returns:
the evaluated Expression. Can be a Constant.

main

public static void main(java.lang.String[] args)
An example