|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.Equation
public class Equation
Complex equation model
Originally of the ResMedii project
This class uses a binary tree structure to store the relationship between MathTokens in a user inputted equations. An instance of this class contains a MathToken and a reference to a left and right sub equation.
Created by Michael Rule on Sun Aug 08 2004.
Constructor Summary | |
---|---|
Equation()
initializes an empty equation |
|
Equation(Equation equ)
Cloning Equation constructor |
|
Equation(Equation equ,
MathToken opr)
combines an equation and a single MathToken |
|
Equation(Equation equ,
MathToken opr,
Equation equ2)
cobmines two equations with a perscribed operation |
|
Equation(MathToken opr)
|
Method Summary | |
---|---|
boolean |
equals(Equation equ)
A lazy equals method that compares the toStrings of both equations |
complex |
evaluate(ComplexVarList variables)
Evaluates the equation for the given variables |
Evaluation |
getEvaluationOperation()
|
Equation |
getLeft()
|
Evaluation |
getOperation()
|
Equation |
getRight()
|
java.lang.String |
getVariables()
returns a string of the chars of all variables contained within this Equation structure |
boolean |
is_analytic()
Checks if an equation is analytic |
void |
setEvaluationOperation(MathToken token)
Sets the MathToken of this Equation |
void |
setLeft(Equation equ)
Sets the left subEquation of this Equation |
void |
setRight(Equation equ)
Sets the right subEquation of this Equation |
void |
substitute(char Variable,
complex number)
Performs variable substitution .. |
java.lang.String |
toString()
This overrides toString in Object and converts an Equation into a fairly readable String |
java.lang.String |
toStringHelper()
assists toString, calling itself recursivly on all subEquatons |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Equation()
public Equation(Equation equ, MathToken opr, Equation equ2)
equ
- opr
- equ2
- public Equation(Equation equ, MathToken opr)
equ
- opr
- public Equation(MathToken opr)
opr
- public Equation(Equation equ)
equ
- Method Detail |
---|
public Evaluation getOperation()
public Equation getLeft()
public Equation getRight()
public void setEvaluationOperation(MathToken token)
token
- public Evaluation getEvaluationOperation()
public void setLeft(Equation equ)
equ
- public void setRight(Equation equ)
equ
- public complex evaluate(ComplexVarList variables)
variables
-
public void substitute(char Variable, complex number)
Variable
- number
- public boolean is_analytic()
public java.lang.String getVariables()
public boolean equals(Equation equ)
equ
-
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringHelper()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |