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

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

public class IFTE
extends java.lang.Object
implements Expression

DOCUMENT ME!

See Also:
Serialized Form

Constructor Summary
IFTE(Logical condition, Expression x, Expression y)
           
 
Method Summary
 boolean contains(Expression e)
          The method contains should return true if the Expression e is found in the expression (this), else false should be returned.
 Expression diff(NamedDataExpression x)
          Returns the differential quotient for the Expression object.
 boolean equals(java.lang.Object e)
          DOCUMENT ME!
 double eval()
          Returns the value of the Expression object.
 Expression factor(Expression e)
          The method should attempt to return the factor of the Expression e in the Expression this.
 java.util.List getElements()
          The getElements method must return a java.util.List whose elements are all the subexpressions of the Expression.
 boolean isDifferentiable()
          Returns whether the object in question is differentiable.
 boolean isExpandable()
          Returns whether the object in question is expandable as a Taylor expansion.
 Expression isolate(Expression e)
          The method should attempt to isolate the Expression e in the equation this=0, and return the resulting Expression.
 Expression isolate(Expression f, Expression e)
          The method should attempt to isolate the expression e in the equation this=f, and return the resulting Expression.
 Expression optimize()
          Returns a new Expression object that represents the optimized expression.
 Expression replace(Expression a, Expression b)
          Replace all occurences of the Expression a in the current expression with the Expression b.
 java.lang.String toJava()
          Returns String object representing Expression in Java source code.
 java.lang.String toString()
          Returns String object representing Expression.
 java.lang.String toTaylorMap()
          Returns String object representing org.jscience.mathematics.analysis.expressions.Tmap
 java.lang.String toXML()
          Returns String XML representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IFTE

public IFTE(Logical condition,
            Expression x,
            Expression y)
Method Detail

eval

public double eval()
Returns the value of the Expression object.

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

isDifferentiable

public boolean isDifferentiable()
Returns whether the object in question is differentiable. Note that whether the object is differentiable or not, it is still required to define the diff method.

Specified by:
isDifferentiable in interface Expression
See Also:
Expression.diff(NamedDataExpression)

isExpandable

public boolean isExpandable()
Returns whether the object in question is expandable as a Taylor expansion. Note that whether the object is expandable or not, it is still required to define the diff method.

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

diff

public Expression diff(NamedDataExpression x)
Returns the differential quotient for the Expression object.

Specified by:
diff in interface Expression
Parameters:
x - The NamedDataExpression object representing the variable/parameter we wish to differentiate with respect to.
Returns:
A new Expression representing the differential quotient.
Since:
1.0

optimize

public Expression optimize()
Returns a new Expression object that represents the optimized expression.

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

replace

public Expression replace(Expression a,
                          Expression b)
Replace all occurences of the Expression a in the current expression with the Expression b.

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!

toJava

public java.lang.String toJava()
Returns String object representing Expression in Java source code.

Specified by:
toJava in interface Expression
Specified by:
toJava in interface JavaExpressible
Returns:
String object representing Expression in Java source code.
Since:
1.0

toString

public java.lang.String toString()
Returns String object representing Expression.

Overrides:
toString in class java.lang.Object
Returns:
String object representing Expression.
Since:
1.0

toTaylorMap

public java.lang.String toTaylorMap()
Returns String object representing org.jscience.mathematics.analysis.expressions.Tmap

Specified by:
toTaylorMap in interface Expression
Returns:
String object representing org.jscience.mathematics.analysis.expressions.Tmap.
Since:
1.0

toXML

public java.lang.String toXML()
Returns String XML representation

Specified by:
toXML in interface Expression
Specified by:
toXML in interface XMLExpressible
Returns:
String XML representation.
Since:
1.0

getElements

public java.util.List getElements()
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).

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

contains

public boolean contains(Expression e)
The method contains should return true if the Expression e is found in the expression (this), else false should be returned.

Specified by:
contains in interface Expression
Parameters:
e - DOCUMENT ME!
Returns:
DOCUMENT ME!

isolate

public Expression isolate(Expression e)
The method should attempt to isolate the Expression e in the equation this=0, and return the resulting Expression. If unable to isolate the Expression null should be returned.

Specified by:
isolate in interface Expression
Parameters:
e - DOCUMENT ME!
Returns:
DOCUMENT ME!

isolate

public Expression isolate(Expression f,
                          Expression e)
The method should attempt to isolate the expression e in the equation this=f, and return the resulting Expression. If unable to isolate the Expression null should be returned.

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

factor

public Expression factor(Expression e)
The method should attempt to return the factor of the Expression e in the Expression this. If unable to locate a factor null should be returned.

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