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

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

public class Abs
extends UnaryOperator

Class representing the absolute value of an Expression object.
Example of use:

 Expression e1 = ...;
 Expression e2 = new Abs( e1 );
 

See Also:
UnaryOperator, Serialized Form

Field Summary
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.UnaryOperator
deriv, evalValid, evalValue, valid
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
firstOperand
 
Constructor Summary
Abs(Expression operand)
          Creates an object that represent the sine of an Expression object.
 
Method Summary
 boolean equals(java.lang.Object e)
          DOCUMENT ME!
 double eval()
          DOCUMENT ME!
 boolean isDifferentiable()
          The absolute value function is not differentiable so we override the inherited isDifferentiable method.
 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 toXML()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.mathematics.analysis.expressions.UnaryOperator
diff, getElements, resetNumDiff, resetNumEval, setIndex, setNumberOfIndependents, toTaylorMap
 
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

Abs

public Abs(Expression operand)
Creates an object that represent the sine of an Expression object.

Parameters:
operand - An Expression object.
Method Detail

eval

public double eval()
DOCUMENT ME!

Returns:
DOCUMENT ME!

replace

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

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

isDifferentiable

public boolean isDifferentiable()
The absolute value function is not differentiable so we override the inherited isDifferentiable method.

Specified by:
isDifferentiable in interface Expression
Overrides:
isDifferentiable in class UnaryOperator
See Also:
Expression.isDifferentiable()

isExpandable

public boolean isExpandable()
DOCUMENT ME!

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

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!

optimize

public Expression optimize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toXML

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

Returns:
DOCUMENT ME!