org.jscience.mathematics.analysis.expressions
Class TernaryOperator

java.lang.Object
  extended by org.jscience.mathematics.analysis.expressions.OperatorExpression
      extended by org.jscience.mathematics.analysis.expressions.TernaryOperator
All Implemented Interfaces:
java.io.Serializable, Expression, JavaExpressible, XMLExpressible
Direct Known Subclasses:
Mod, Step

public abstract class TernaryOperator
extends OperatorExpression

Abstract class used as superclass for ternary operators.

See Also:
UnaryOperator, BinaryOperator, OperatorExpression, Serialized Form

Field Summary
protected  Expression secondOperand
          The second Expression this TernaryOperator works on.
protected  Expression thirdOperand
          The third Expression this TernaryOperator works on.
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
firstOperand
 
Constructor Summary
TernaryOperator(Expression e1, Expression e2, Expression e3)
          Creates a TernaryOperator object working on three given Expression objects.
 
Method Summary
 Expression diff(NamedDataExpression x)
          Class TernaryOperator provides a default diff method for use by nondifferentiable objects.
 java.util.List getElements()
          DOCUMENT ME!
 Expression getSecondOperand()
          Returns the second operand that the TernaryOperator object works on.
 Expression getThirdOperand()
          Returns the third operand that the TernaryOperator object works on.
 boolean isDifferentiable()
          Default implementation of method isDifferentiable which assumes that the BinaryOperator object is differentiable.
 boolean isExpandable()
          Default implementation of method isExpandable which assumes that the TernaryOperator object is expandable.
 void setSecondOperand(Expression e2)
          Assigns the second operand that the TernaryOperator object works on to a given Expression object.
 void setThirdOperand(Expression e3)
          Assigns the third operand that the TernaryOperator object works on to a given Expression object.
 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

secondOperand

protected Expression secondOperand
The second Expression this TernaryOperator works on.


thirdOperand

protected Expression thirdOperand
The third Expression this TernaryOperator works on.

Constructor Detail

TernaryOperator

public TernaryOperator(Expression e1,
                       Expression e2,
                       Expression e3)
Creates a TernaryOperator object working on three given Expression objects.

Parameters:
e1 - An Expression object.
e2 - Another Expression object.
e3 - Yet another Expression object.
Since:
1.0
Method Detail

setSecondOperand

public void setSecondOperand(Expression e2)
Assigns the second operand that the TernaryOperator object works on to a given Expression object.

Parameters:
e2 - An Expression object.
See Also:
getSecondOperand()

setThirdOperand

public void setThirdOperand(Expression e3)
Assigns the third operand that the TernaryOperator object works on to a given Expression object.

Parameters:
e3 - An Expression object.
See Also:
getThirdOperand()

getSecondOperand

public Expression getSecondOperand()
Returns the second operand that the TernaryOperator object works on.

Returns:
An Expression object that represents the second operand that the TernaryOperator object works on.
See Also:
setSecondOperand(org.jscience.mathematics.analysis.expressions.Expression)

getThirdOperand

public Expression getThirdOperand()
Returns the third operand that the TernaryOperator object works on.

Returns:
An Expression object that represents the third operand that the TernaryOperator object works on.
See Also:
setThirdOperand(org.jscience.mathematics.analysis.expressions.Expression)

isDifferentiable

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

See Also:
Expression.isDifferentiable()

isExpandable

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

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

diff

public Expression diff(NamedDataExpression x)
Class TernaryOperator 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()
DOCUMENT ME!

Returns:
DOCUMENT ME!