JSci.maths.symbolic
Class Power

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

 class Power
extends Expression


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

Constructor Detail

Power

public Power(Expression b,
             int e)
Method Detail

getBase

public Expression getBase()

getExponent

public int getExponent()

toString

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

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

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.

getPriority

protected 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

getSet

public java.lang.Object getSet()