Expression class abstract
Any Expression supports basic mathematical operations like addition, subtraction, multiplication, division, power and negate.
Furthermore, any expression can be differentiated with respect to a given variable. Also expressions know how to simplify themselves.
There are different classes of expressions:
-
Literals (see Literal)
- Number Literals (see Number)
- Variable Literals (see Variable)
- Vector Literals (see Vector)
- Interval Literals (see IntervalLiteral)
-
Operators (support auto-wrapping of parameters into Literals)
- Unary Operators (see UnaryOperator)
- Binary Operators (see BinaryOperator)
-
Functions (see MathFunction)
- Pre-defined Functions (see DefaultFunction)
- Composite Functions (see CompositeFunction)
- Custom Functions (see CustomFunction)
Pre-defined functions are Exponential, Log, Ln, nth-Root, Sqrt, Abs, Ceil, Floor, Sgn, Sin, Cos, Tan, Asin, Acos and Atan.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
derive(
String toVar) → Expression - Derives this expression with respect to the given variable.
-
evaluate(
EvaluationType type, ContextModel context) → dynamic - Evaluates this expression according to given type and context.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
simplify(
) → Expression - Returns a simplified version of this expression. Subclasses should overwrite this method, if applicable.
-
toString(
) → String -
Returns a string version of this expression.
Subclasses should override this method. The output should be kept
compatible with the Parser.
override
Operators
-
operator %(
Expression exp) → Expression - Modulo operator. Creates a Modulo expression.
-
operator *(
Expression exp) → Expression - Multiply operator. Creates a Times expression.
-
operator +(
Expression exp) → Expression - Add operator. Creates a Plus expression.
-
operator -(
Expression exp) → Expression - Subtract operator. Creates a Minus expression.
-
operator /(
Expression exp) → Expression - Divide operator. Creates a Divide expression.
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator ^(
Expression exp) → Expression - Power operator. Creates a Power expression.
-
operator unary-(
) → Expression - Unary minus operator. Creates a UnaryMinus expression.