math.objects
Class UnaryExpression
java.lang.Object
|
+--math.objects.Expression
|
+--math.objects.UnaryExpression
- Direct Known Subclasses:
- AbsoluteValue, ArcCoSecant, ArcCosine, ArcCoTangent, ArcSecant, ArcSine, ArcTangent, CoSecant, Cosine, CoTangent, Exponential, HyperbolicCoSecant, HyperbolicCosine, HyperbolicCoTangent, HyperbolicSecant, HyperbolicSine, HyperbolicTangent, Ln, Secant, Sine, SquareRoot, Tangent
- public abstract class UnaryExpression
- extends Expression
The UnaryExpression class defines an extends of the Expression
class to include unary expressions like Sine and Exponential
- Since:
- JDK1.1
- Author:
- Peter Staab
, Pete Fox
, both for the Mathematical Visualization Project for the
Department of Applied Mathematics, University of Colorado at
Boulder
Field Summary |
protected Expression |
onlyChild
This variable stores the only child of a unary expression. |
Method Summary |
Expression |
getOnlyChild()
The method getOnlyChild returns the only child of a
unary expression. |
void |
setOnlyChild(Expression expr)
The method setOnlyChild sets the only child of
a unary expression. |
Expression |
simplify()
A method that returns a Expression representation
of the ArcCosine object with its onlyChild in a simplified form
with redundant terms combined and terms multiplied by zero eliminated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
onlyChild
protected Expression onlyChild
- This variable stores the only child of a unary expression.
UnaryExpression
protected UnaryExpression(Expression child)
getOnlyChild
public Expression getOnlyChild()
- The method
getOnlyChild
returns the only child of a
unary expression.
- Returns:
- an
Expression
value
setOnlyChild
public void setOnlyChild(Expression expr)
- The method
setOnlyChild
sets the only child of
a unary expression.
- Parameters:
expr
- an Expression
value
simplify
public Expression simplify()
- A method that returns a Expression representation
of the ArcCosine object with its onlyChild in a simplified form
with redundant terms combined and terms multiplied by zero eliminated.
- Specified by:
simplify
in class Expression
- Returns:
- an Expression object in a simplified form
mvt.icons