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

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.Addition
All Implemented Interfaces:
java.io.Serializable, Expression, NumericalDifferentiable, JavaExpressible, XMLExpressible

public class Addition
extends BinaryOperator
implements NumericalDifferentiable

Class representing addition of two Expression objects.
Example of use:

 Expression e1 = ...;
 Expression e2 = ...;
 Expression e3 = new Addition( e1, e2 );
 

See Also:
Expression, 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
Addition(Expression leftOp, Expression rightOp)
          Creates an Addition object that represent the addition between two Expression objects.
 
Method Summary
 java.lang.Object clone()
          Experimental clone support method.
 Expression diff(NamedDataExpression x)
          DOCUMENT ME!
 boolean equals(java.lang.Object e)
          DOCUMENT ME!
 double eval()
          DOCUMENT ME!
 Expression factor(Expression e)
          DOCUMENT ME!
 Expression isolate(Expression f, Expression e)
          DOCUMENT ME!
 double numDiff(int i)
          DOCUMENT ME!
 double numEval()
          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
getElements, getSecondOperand, isDifferentiable, isExpandable, resetNumDiff, resetNumEval, setIndex, setNumberOfIndependents, setSecondOperand
 
Methods inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
contains, getFirstOperand, isolate, setFirstOperand
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jscience.mathematics.analysis.expressions.NumericalDifferentiable
resetNumDiff, resetNumEval, setIndex, setNumberOfIndependents
 

Constructor Detail

Addition

public Addition(Expression leftOp,
                Expression rightOp)
Creates an Addition object that represent the addition between two Expression objects.

Parameters:
leftOp - The left hand side operand Expression object.
rightOp - The righ thand side operand Expression object.
Method Detail

eval

public double eval()
DOCUMENT ME!

Specified by:
eval in interface Expression
Returns:
DOCUMENT ME!

diff

public Expression diff(NamedDataExpression x)
DOCUMENT ME!

Specified by:
diff in interface Expression
Overrides:
diff in class BinaryOperator
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

numDiff

public double numDiff(int i)
DOCUMENT ME!

Specified by:
numDiff in interface NumericalDifferentiable
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

numEval

public double numEval()
DOCUMENT ME!

Specified by:
numEval in interface NumericalDifferentiable
Returns:
DOCUMENT ME!

replace

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

Specified by:
replace in interface Expression
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!

Specified by:
toJava in interface Expression
Specified by:
toJava in interface JavaExpressible
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!

Specified by:
optimize in interface Expression
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
Experimental clone support method.

Overrides:
clone in class java.lang.Object

isolate

public Expression isolate(Expression f,
                          Expression e)
DOCUMENT ME!

Specified by:
isolate in interface Expression
Overrides:
isolate in class OperatorExpression
Parameters:
f - DOCUMENT ME!
e - DOCUMENT ME!
Returns:
DOCUMENT ME!

factor

public Expression factor(Expression e)
DOCUMENT ME!

Specified by:
factor in interface Expression
Overrides:
factor in class OperatorExpression
Parameters:
e - DOCUMENT ME!
Returns:
DOCUMENT ME!

toXML

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

Specified by:
toXML in interface Expression
Specified by:
toXML in interface XMLExpressible
Returns:
DOCUMENT ME!