Help - User Expressions
From TTA Help System
Revision as of 15:04, 7 October 2020 by BenStoever (talk | contribs) (→General mathematical functions)
In Topological Tree Analyszer user-defined expressions are used to calculate the actual data (e.g., distances between trees) from basic topological values. A set of functions is available to formulate such expressions and to access the basic values. An unlimited number of user expressions can be defined and will be written to a results table at the end of an analysis. It is also possible to reference results from one user expression from another one and reuse the result there.
Contents
Functions to access basic topological values
Functions to access results of other expressions
Operators
The following list contains all valid operators. Each operator binds as strong or more than all operators listed below. The right columns indicate which types the operands need to have.
Text functions
General mathematical functions
Name: | Definition: | Description: |
---|---|---|
Sine | sin(Numeric x) |
Calculates the sine of the passed numeric value. |
Cosine | cos(Numeric x) |
Calculates the cosine of the passed numeric value. |
Tangent | tan(Numeric x) |
Calculates the tangent of the passed numeric value. |
Inverse sine | asin(Numeric x) |
Calculates the inverse sine of the passed numeric value. |
Inverse cosine | acos(Numeric x) |
Calculates the inverse cosine of the passed numeric value. |
Inverse tangent | atan(Numeric x) |
Calculates the inverse tangent of the passed numeric value. |
Inverse tangent | atan2(Numeric x, Numeric y) |
Calculates the inverse tangent (or arcus tangent) of y / x given adjacent and x. The result is between -π and π |
Hyperbolic sine | sinh(Numeric x) |
Calculates the hyperbolic sine of the given angle. |
Hyperbolic cosine | cosh(Numeric x) |
Calculates the hyperbolic cosine of the given angle. |
Hyperbolic tangent | tanh(Numeric x) |
Calculates the hyperbolic tangent of the given angle. |
Inverse hyperbolic sine | asinh(Numeric x) |
Calculates the inverse hyperbolic sine of the given angle. |
Inverse hyperbolic cosine | acosh(Numeric x) |
Calculates the inverse hyperbolic cosine of the given angle. |
Inverse hyperbolic tangent | atanh(Numeric x) |
Calculates the inverse hyperbolic tangent of the given angle. |
Natural logarithm | ln(Numeric x) |
Calculates the natural logarithm of the passed numeric value. |
Logarithm to the base 10 | log(Numeric x) |
Calculates the logarithm to the base 10 of the passed numeric value. |
Exponential function | exp(Numeric x) |
Calculates the exponential function to the base e. It is the inverse function of the natural logarithm (ln ). |
Magnitude | abs(Numeric x) |
Returns the absolute value of the passed numeric parameter. |
Random number | rand(Numeric x) |
Returns a random number between 0 and 1. |
Square Root | sqrt(Numeric x) |
Calculates the square root of the passed numeric parameter. |
Alternative | if(Boolean condition, Numeric or textual trueValue, Numeric or textual falseValue) |
Returns the second parameter if the condition is true or the third if not. |
Number to text | str(Numeric or textual x) |
Returns a textual representation of the passed parameter. |