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

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

public class Step
extends TernaryOperator

Class representing the step function.

See Also:
TernaryOperator, Serialized Form

Field Summary
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.TernaryOperator
secondOperand, thirdOperand
 
Fields inherited from class org.jscience.mathematics.analysis.expressions.OperatorExpression
firstOperand
 
Constructor Summary
Step(Expression steptime, Expression stepvalue)
          Creates an object that represent the step function.
Step(Expression time, Expression steptime, Expression stepvalue)
          Creates an object that represents the step function.
 
Method Summary
 boolean equals(java.lang.Object e)
          DOCUMENT ME!
 double eval()
          DOCUMENT ME!
 boolean isDifferentiable()
          The step function is not differentiable so we override the inherited isDifferentiable method.
 boolean isExpandable()
          The step function is not expandable so we override the inherited isExpandable method.
 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.TernaryOperator
diff, getElements, getSecondOperand, getThirdOperand, setSecondOperand, setThirdOperand, 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

Step

public Step(Expression time,
            Expression steptime,
            Expression stepvalue)
Creates an object that represents the step function. If the first expression evaluates to a value larger than or equal to the second expression, the step value is returned. If not zero is returned.

Parameters:
time - Usually the normal time
steptime - The time from which the step function should be stepvalue rather than zero
stepvalue - The value to which the step function steps at time steptime

Step

public Step(Expression steptime,
            Expression stepvalue)
Creates an object that represent the step function.

Parameters:
steptime - DOCUMENT ME!
stepvalue - DOCUMENT ME!
Method Detail

eval

public double eval()
DOCUMENT ME!

Returns:
DOCUMENT ME!

isDifferentiable

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

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

isExpandable

public boolean isExpandable()
The step function is not expandable so we override the inherited isExpandable method.

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

replace

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

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!

Returns:
DOCUMENT ME!

optimize

public Expression optimize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toXML

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

Returns:
DOCUMENT ME!