org.jscience.mathematics.analysis.expressions.symbolic
Class Diff

java.lang.Object
  extended by org.jscience.mathematics.analysis.expressions.OperatorExpression
      extended by org.jscience.mathematics.analysis.expressions.BinaryOperator
          extended by org.jscience.mathematics.analysis.expressions.symbolic.Diff
All Implemented Interfaces:
java.io.Serializable, Expression, JavaExpressible, XMLExpressible

public class Diff
extends BinaryOperator

Class representing the derivative of an Expression objects.
Example of use:

 Expression e1 = ...;
 NamedDataExpression e2 = ...;
 Expression e3 = new Diff( e1, e2 );
 

See Also:
Expression, NamedDataExpression, BinaryOperator, Serialized Form

Field Summary
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.BinaryOperator
deriv, evalValid, evalValue, secondOperand, valid
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
firstOperand
 
Constructor Summary
Diff(Expression op1, NamedDataExpression op2)
          Creates a Diff object that represents the derivative of an Expression objects with respect to a NamedDataExpression.
 
Method Summary
 boolean equals(java.lang.Object e)
          DOCUMENT ME!
 double eval()
          DOCUMENT ME!
 boolean isDifferentiable()
          DOCUMENT ME!
 boolean isExpandable()
          DOCUMENT ME!
 Expression optimize()
          DOCUMENT ME!
 Expression replace(Expression a, Expression b)
          DOCUMENT ME!
 java.lang.String toJava()
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 java.lang.String toTaylorMap()
          DOCUMENT ME!
 java.lang.String toXML()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.mathematics.analysis.expressions.BinaryOperator
diff, getElements, getSecondOperand, resetNumDiff, resetNumEval, setIndex, setNumberOfIndependents, setSecondOperand
 
Methods inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
contains, factor, getFirstOperand, isolate, isolate, setFirstOperand
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Diff

public Diff(Expression op1,
            NamedDataExpression op2)
Creates a Diff object that represents the derivative of an Expression objects with respect to a NamedDataExpression.

Parameters:
op1 - An Expression object.
op2 - NamedDataExpression representing the independent variable.
Method Detail

eval

public double eval()
DOCUMENT ME!

Returns:
DOCUMENT ME!

isDifferentiable

public boolean isDifferentiable()
DOCUMENT ME!

Specified by:
isDifferentiable in interface Expression
Overrides:
isDifferentiable in class BinaryOperator
Returns:
DOCUMENT ME!
See Also:
Expression.isDifferentiable()

isExpandable

public boolean isExpandable()
DOCUMENT ME!

Specified by:
isExpandable in interface Expression
Overrides:
isExpandable in class BinaryOperator
Returns:
DOCUMENT ME!
See Also:
Expression.isExpandable()

replace

public Expression replace(Expression a,
                          Expression b)
DOCUMENT ME!

Parameters:
a - DOCUMENT ME!
b - DOCUMENT ME!
Returns:
DOCUMENT ME!

equals

public boolean equals(java.lang.Object e)
DOCUMENT ME!

Overrides:
equals in class java.lang.Object
Parameters:
e - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

toJava

public java.lang.String toJava()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toTaylorMap

public java.lang.String toTaylorMap()
DOCUMENT ME!

Specified by:
toTaylorMap in interface Expression
Overrides:
toTaylorMap in class BinaryOperator
Returns:
DOCUMENT ME!

optimize

public Expression optimize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toXML

public java.lang.String toXML()
DOCUMENT ME!

Returns:
DOCUMENT ME!