|
MVT API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--math.objects.Expression | +--math.objects.BinaryExpression
The BinaryExpression class defines an extends of the Expression class to include binary expressions like Add and Mulitply and a left child and right child each pointing to a expr class object
Field Summary | |
protected Expression |
leftChild
The variables leftChild and rightChild store the first and second children of binary expressions. |
protected Expression |
rightChild
The variables leftChild and rightChild store the first and second children of binary expressions. |
Constructor Summary | |
protected |
BinaryExpression(Expression left,
Expression right)
Creates a new BinaryExpression instance. |
Method Summary | |
Expression |
getLeftChild()
The method getLeftChild returns the left child of
a binary expression. |
Expression |
getRightChild()
The method getRightChild returns the right child of
a binary expression. |
void |
setLeftChild(Expression expr)
The method setLeftChild sets the left child. |
void |
setRightChild(Expression expr)
The method setRightChild sets the right child expression. |
Expression |
simplify()
A method that returns a Expression representation of the Log object with its Children in a simplified form with redundant terms combined and terms multiplied by zero eliminated. |
Methods inherited from class math.objects.Expression |
differentiate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluateVariables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Expression leftChild
protected Expression rightChild
Constructor Detail |
protected BinaryExpression(Expression left, Expression right)
BinaryExpression
instance.
left
- an Expression
valueright
- an Expression
valueMethod Detail |
public Expression getLeftChild()
getLeftChild
returns the left child of
a binary expression.
Expression
valuepublic void setLeftChild(Expression expr)
setLeftChild
sets the left child.
expr
- an Expression
valuepublic Expression getRightChild()
getRightChild
returns the right child of
a binary expression.
Expression
valuepublic void setRightChild(Expression expr)
setRightChild
sets the right child expression.
expr
- an Expression
valuepublic Expression simplify()
simplify
in class Expression
|
MVT API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |