org.jscience.mathematics.analysis.expressions
Class UnaryOperator

java.lang.Object
  extended by org.jscience.mathematics.analysis.expressions.OperatorExpression
      extended by org.jscience.mathematics.analysis.expressions.UnaryOperator
All Implemented Interfaces:
java.io.Serializable, Expression, JavaExpressible, XMLExpressible
Direct Known Subclasses:
Abs, Acos, Asin, Atan, Cos, Exp, Log, Minus, Sign, Sin, Sqrt, Tan

public abstract class UnaryOperator
extends OperatorExpression

Abstract class used as superclass for all unary operators.

See Also:
BinaryOperator, OperatorExpression, Serialized Form

Field Summary
protected  double[] deriv
          DOCUMENT ME!
protected  boolean evalValid
          DOCUMENT ME!
protected  double evalValue
          DOCUMENT ME!
protected  boolean[] valid
          DOCUMENT ME!
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
firstOperand
 
Constructor Summary
UnaryOperator(Expression e1)
          Creates a UnaryOperator object working on a given Expression object.
 
Method Summary
 Expression diff(NamedDataExpression x)
          Class UnaryOperator provides a default diff method for use by nondifferentiable objects.
 java.util.List getElements()
          The getElements method must return a java.util.List whose elements are all the subexpressions of the Expression.
 boolean isDifferentiable()
          Default implementation of method isDifferentiable which assumes that the UnaryOperator object is differentiable.
 boolean isExpandable()
          Default implementation of method isExpandable which assumes that the UnaryOperator object is expandable.
 void resetNumDiff(int i)
          DOCUMENT ME!
 void resetNumEval()
          DOCUMENT ME!
 void setIndex(int i)
          DOCUMENT ME!
 void setNumberOfIndependents(int n)
          DOCUMENT ME!
 java.lang.String toTaylorMap()
          Dummy implementation for classes that are not expandable.
 
Methods inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
contains, factor, getFirstOperand, isolate, isolate, setFirstOperand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jscience.mathematics.analysis.expressions.Expression
eval, optimize, replace, toJava, toXML
 

Field Detail

evalValid

protected boolean evalValid
DOCUMENT ME!


evalValue

protected double evalValue
DOCUMENT ME!


valid

protected boolean[] valid
DOCUMENT ME!


deriv

protected double[] deriv
DOCUMENT ME!

Constructor Detail

UnaryOperator

public UnaryOperator(Expression e1)
Creates a UnaryOperator object working on a given Expression object.

Parameters:
e1 - An Expression object.
Since:
1.0
Method Detail

isDifferentiable

public boolean isDifferentiable()
Default implementation of method isDifferentiable which assumes that the UnaryOperator object is differentiable. All nondifferentiable UnaryOperators must overrride this implementation.

See Also:
Expression.isDifferentiable()

isExpandable

public boolean isExpandable()
Default implementation of method isExpandable which assumes that the UnaryOperator object is expandable. All nonexpandable UnaryOperators must overrride this implementation.

Returns:
DOCUMENT ME!
See Also:
Expression.isExpandable()

diff

public Expression diff(NamedDataExpression x)
Class UnaryOperator provides a default diff method for use by nondifferentiable objects. All differentiable objects must override this diff method.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

toTaylorMap

public java.lang.String toTaylorMap()
Dummy implementation for classes that are not expandable.

Returns:
DOCUMENT ME!

getElements

public java.util.List getElements()
Description copied from interface: Expression
The getElements method must return a java.util.List whose elements are all the subexpressions of the Expression. For example the expression "acos(ct)" should return a java.util.List with six subexpressions: "[,a,cos,,c,t]" (the order of which is unspecified).

Returns:
DOCUMENT ME!

resetNumEval

public void resetNumEval()
DOCUMENT ME!


resetNumDiff

public void resetNumDiff(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!

setNumberOfIndependents

public void setNumberOfIndependents(int n)
DOCUMENT ME!

Parameters:
n - DOCUMENT ME!

setIndex

public void setIndex(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!