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

Variable Index

 o CalcDebug
CalcDebug = true outputs debug messages during calculations
 o operand
The parameter if it is only a single operand.
 o Operanden
The parameters of this element of the TermBaum stucture
 o packagePraefix
Name of the package that keeps the function classes
 o ParseDebug
ParseDebug = true outputs debug messages during parsing
 o rz
Calculation symbols ordered by priority
 o StrictSyntax
StrictSyntax = true forbids free signs in sums, ...

Constructor Index

 o TermBaum()
Insert the method's description here.
 o TermBaum(Liste)
Insert the method's description here.
 o TermBaum(TermBaum)
Insert the method's description here.

Method Index

 o ableitung(String)
Build the Deviation with respect to the given variable.
 o berechne(VariableTable, int)
Calculates the (recursively calculated) value of this TermBaum.
 o berechneTerm(String, int)
If Variables are not needed this method is a bit shorter to be called.
 o berechneTerm(String, VariableTable, int)
Calculating the value of a given string term considering the given variables.
 o clone()
returns a copy of this TermBaum as an Object.
 o cloneTerm()
Builds a complete recursive copy of this TermBaum.
 o debugC(String)
 o debugP(String)
 o getDependencies()
Insert the method's description here.
 o getDependenciesRec(Liste)
Insert the method's description here.
 o getMaxRZ(String)
Looks for the weakest calculation symbol in the top most level of the Term.
 o getOperand()
Returns the value operand field, i.e.
 o ohneKlammernAussen(String, int)
Remove outer brackets.
 o parseTerm(String)
Parses a complete Term line into a TermBaum structure.
 o parseTerm(String, int)
Parses a Term into a Tree representation.
 o removeWhitespaces(String)
Returns a copy of the String that has all Whitespaces removed.
 o sucheKlammerEnde(String, int, int)
Look for the bracket terminating the bracket Term beginning at the given location.
 o teileNachRZ(String, int, char)
Divides the Term by the given calculation symbol.
 o toString()
Returns a String representation of this TermBaum.
 o vereinfache()
Simplifying the Term.

Variables

 o packagePraefix
 protected static final String packagePraefix
Name of the package that keeps the function classes

 o ParseDebug
 protected static final boolean ParseDebug
ParseDebug = true outputs debug messages during parsing

 o CalcDebug
 protected static final boolean CalcDebug
CalcDebug = true outputs debug messages during calculations

 o StrictSyntax
 protected static final boolean StrictSyntax
StrictSyntax = true forbids free signs in sums, ...

 o Operanden
 protected Liste Operanden
The parameters of this element of the TermBaum stucture

 o operand
 protected TermBaum operand
The parameter if it is only a single operand.

 o rz
 protected static final char rz[]
Calculation symbols ordered by priority

Constructors

 o TermBaum
 protected TermBaum(Liste operanden)
Insert the method's description here. Creation date: (03.12.1999 %T)

Parameters:
operanden - term.Liste
 o TermBaum
 protected TermBaum(TermBaum operand)
Insert the method's description here. Creation date: (03.12.1999 %T)

Parameters:
operand - term.TermBaum
 o TermBaum
 protected TermBaum()
Insert the method's description here. Creation date: (03.12.1999 %T)

Methods

 o ableitung
 public abstract TermBaum ableitung(String variable)
Build the Deviation with respect to the given variable.

 o berechne
 public abstract BigDecimal berechne(VariableTable Variablen,
                                     int Genauigkeit)
Calculates the (recursively calculated) value of this TermBaum.

 o 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.

 o 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.

 o clone
 public Object clone()
returns a copy of this TermBaum as an Object.

Overrides:
clone in class Object
 o cloneTerm
 public abstract TermBaum cloneTerm()
Builds a complete recursive copy of this TermBaum.

 o debugC
 protected static void debugC(String M)
 o debugP
 protected static void debugP(String M)
 o getDependencies
 public String[] getDependencies()
Insert the method's description here. Creation date: (28.11.1999 %T)

Returns:
java.lang.String[]
 o getDependenciesRec
 protected void getDependenciesRec(Liste list)
Insert the method's description here. Creation date: (28.11.1999 %T)

Returns:
java.lang.String[]
 o 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.
 o 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.

 o ohneKlammernAussen
 public static String ohneKlammernAussen(String Term,
                                         int Offset) throws TermFaultException
Remove outer brackets. The Term must not have any Whitespaces.

See Also:
removeWhitespaces
 o 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
 o 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
 o removeWhitespaces
 public static String removeWhitespaces(String term)
Returns a copy of the String that has all Whitespaces removed.

 o 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.

 o 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).
 o 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
 o vereinfache
 public abstract TermBaum vereinfache()
Simplifying the Term.


All Packages  Class Hierarchy  This Package  Previous  Next  Index