All Packages Class Hierarchy This Package Previous Next Index
Class term.TermBaum
java.lang.Object
|
+----term.TermBaum
- public abstract class TermBaum
- extends Object
TermBaum is the super class of all parts of the Tree representation
of the Term. It integrates basic parse methods to generate a TermBaum
structure from a given function string. Subclasses have to provide
specific methods (abstract here) to implement unique functions.
- See Also:
- ableitung, berechne, cloneTerm, toString, vereinfache
-
CalcDebug
- CalcDebug = true outputs debug messages during calculations
-
operand
- The parameter if it is only a single operand.
-
Operanden
- The parameters of this element of the TermBaum stucture
-
packagePraefix
- Name of the package that keeps the function classes
-
ParseDebug
- ParseDebug = true outputs debug messages during parsing
-
rz
- Calculation symbols ordered by priority
-
StrictSyntax
- StrictSyntax = true forbids free signs in sums, ...
-
TermBaum()
- Insert the method's description here.
-
TermBaum(Liste)
- Insert the method's description here.
-
TermBaum(TermBaum)
- Insert the method's description here.
-
ableitung(String)
- Build the Deviation with respect to the given variable.
-
berechne(VariableTable, int)
- Calculates the (recursively calculated) value of this TermBaum.
-
berechneTerm(String, int)
- If Variables are not needed this method is a bit shorter to be called.
-
berechneTerm(String, VariableTable, int)
- Calculating the value of a given string term considering the given variables.
-
clone()
- returns a copy of this TermBaum as an Object.
-
cloneTerm()
- Builds a complete recursive copy of this TermBaum.
-
debugC(String)
-
-
debugP(String)
-
-
getDependencies()
- Insert the method's description here.
-
getDependenciesRec(Liste)
- Insert the method's description here.
-
getMaxRZ(String)
- Looks for the weakest calculation symbol in the top most
level of the Term.
-
getOperand()
- Returns the value operand field, i.e.
-
ohneKlammernAussen(String, int)
- Remove outer brackets.
-
parseTerm(String)
- Parses a complete Term line into a TermBaum structure.
-
parseTerm(String, int)
- Parses a Term into a Tree representation.
-
removeWhitespaces(String)
- Returns a copy of the String that has all Whitespaces removed.
-
sucheKlammerEnde(String, int, int)
- Look for the bracket terminating the bracket Term beginning
at the given location.
-
teileNachRZ(String, int, char)
- Divides the Term by the given calculation symbol.
-
toString()
- Returns a String representation of this TermBaum.
-
vereinfache()
- Simplifying the Term.
packagePraefix
protected static final String packagePraefix
- Name of the package that keeps the function classes
ParseDebug
protected static final boolean ParseDebug
- ParseDebug = true outputs debug messages during parsing
CalcDebug
protected static final boolean CalcDebug
- CalcDebug = true outputs debug messages during calculations
StrictSyntax
protected static final boolean StrictSyntax
- StrictSyntax = true forbids free signs in sums, ...
Operanden
protected Liste Operanden
- The parameters of this element of the TermBaum stucture
operand
protected TermBaum operand
- The parameter if it is only a single operand.
rz
protected static final char rz[]
- Calculation symbols ordered by priority
TermBaum
protected TermBaum(Liste operanden)
- Insert the method's description here.
Creation date: (03.12.1999 %T)
- Parameters:
- operanden - term.Liste
TermBaum
protected TermBaum(TermBaum operand)
- Insert the method's description here.
Creation date: (03.12.1999 %T)
- Parameters:
- operand - term.TermBaum
TermBaum
protected TermBaum()
- Insert the method's description here.
Creation date: (03.12.1999 %T)
ableitung
public abstract TermBaum ableitung(String variable)
- Build the Deviation with respect to the given variable.
berechne
public abstract BigDecimal berechne(VariableTable Variablen,
int Genauigkeit)
- Calculates the (recursively calculated) value of this TermBaum.
berechneTerm
public static BigDecimal berechneTerm(String Zeile,
int Scale) throws TermFaultException
- If Variables are not needed this method is a bit shorter to be called.
berechneTerm
public static BigDecimal berechneTerm(String Zeile,
VariableTable Vars,
int Scale) throws TermFaultException
- Calculating the value of a given string term considering the given variables.
clone
public Object clone()
- returns a copy of this TermBaum as an Object.
- Overrides:
- clone in class Object
cloneTerm
public abstract TermBaum cloneTerm()
- Builds a complete recursive copy of this TermBaum.
debugC
protected static void debugC(String M)
debugP
protected static void debugP(String M)
getDependencies
public String[] getDependencies()
- Insert the method's description here.
Creation date: (28.11.1999 %T)
- Returns:
- java.lang.String[]
getDependenciesRec
protected void getDependenciesRec(Liste list)
- Insert the method's description here.
Creation date: (28.11.1999 %T)
- Returns:
- java.lang.String[]
getMaxRZ
public static int getMaxRZ(String Term)
- Looks for the weakest calculation symbol in the top most
level of the Term.
- Returns:
- the index of the symbol in the "rz" array or -1
if no symbol was found.
getOperand
protected TermBaum getOperand()
- Returns the value operand field, i.e. the operand if only one exists.
Returns null if the Symbol / Function / ... has more or less than one
operand.
ohneKlammernAussen
public static String ohneKlammernAussen(String Term,
int Offset) throws TermFaultException
- Remove outer brackets. The Term must not have any Whitespaces.
- See Also:
- removeWhitespaces
parseTerm
public static TermBaum parseTerm(String Term,
int Offset) throws TermFaultException
- Parses a Term into a Tree representation.
- Parameters:
- Offset - the current character offset within the input line.
- Term - the String that will be parsed.
The String must not include any Whitespaces. This can be
achieved using the method removeWhitespaces().
- See Also:
- removeWhitespaces
parseTerm
public static final TermBaum parseTerm(String term)
- Parses a complete Term line into a TermBaum structure.
- Parameters:
- Offset - the current character offset within the input line.
- Term - the String that will be parsed.
The String must not include any Whitespaces. This can be
achieved using the method removeWhitespaces().
- See Also:
- removeWhitespaces
removeWhitespaces
public static String removeWhitespaces(String term)
- Returns a copy of the String that has all Whitespaces removed.
sucheKlammerEnde
public static int sucheKlammerEnde(String Term,
int Pos,
int Offset) throws TermFaultException
- Look for the bracket terminating the bracket Term beginning
at the given location.
teileNachRZ
protected static TermBaum teileNachRZ(String Term,
int Offset,
char symbol) throws TermFaultException
- Divides the Term by the given calculation symbol.
- Returns:
- the parsed TermBaum (sum or product).
toString
public abstract String toString()
- Returns a String representation of this TermBaum.
Therefore the sub classes should return the represented Term
in infix notation.
- Overrides:
- toString in class Object
vereinfache
public abstract TermBaum vereinfache()
- Simplifying the Term.
All Packages Class Hierarchy This Package Previous Next Index