MST

interface MST

A Mathematical Syntax Tree (MST) node for mathematical expressions.

Author

Alexander Nozik

Types

Binary
Link copied to clipboard
common
data class Binary(operation: String, left: MST, right: MST) : MST
A node containing binary operation.
Numeric
Link copied to clipboard
common
data class Numeric(value: Number) : MST
A node containing a numeric value or scalar.
Unary
Link copied to clipboard
common
data class Unary(operation: String, value: MST) : MST
A node containing an unary operation.

Inheritors

MST
Link copied to clipboard
MST
Link copied to clipboard
MST
Link copied to clipboard
Symbol
Link copied to clipboard

Extensions

and
Link copied to clipboard
common
open infix override fun MST.and(other: MST): MST
Logic 'and'
div
Link copied to clipboard
common
open operator fun MST.div(other: MST): MST
open operator fun MST.div(other: MST): MST
Division of two elements.
open operator fun MST.div(k: Number): MST
open operator fun MST.div(k: Number): MST
open operator fun MST.div(k: Number): MST
open operator fun MST.div(k: Number): MST
Division of this element by scalar.
interpret
Link copied to clipboard
common
fun <T> MST.interpret(algebra: Algebra<T>, arguments: Map<Symbol, T>): T
Interprets the MST node with this Algebra and optional arguments
fun <T> MST.interpret(algebra: Algebra<T>, vararg arguments: Pair<Symbol, T>): T
Interprets the MST node with this Algebra and optional arguments
minus
Link copied to clipboard
common
open operator override fun MST.minus(other: MST): MST.Binary
Subtraction of two elements.
open operator override fun MST.minus(other: MST): MST.Binary
Subtraction of two elements.
open operator override fun MST.minus(other: MST): MST.Binary
Subtraction of two elements.
open operator fun MST.minus(other: Number): MST
open operator fun MST.minus(other: Number): MST
Subtraction of element from number.
open operator override fun MST.minus(other: MST): MST.Binary
Subtraction of two elements.
not
Link copied to clipboard
common
open operator override fun MST.not(): MST
Logic 'not'
or
Link copied to clipboard
common
open infix override fun MST.or(other: MST): MST
Logic 'or'
plus
Link copied to clipboard
common
open operator fun MST.plus(other: MST): MST
open operator fun MST.plus(other: MST): MST
open operator fun MST.plus(other: MST): MST
open operator fun MST.plus(other: MST): MST
Addition of two elements.
open operator fun MST.plus(other: Number): MST
open operator fun MST.plus(other: Number): MST
Addition of element and scalar.
pow
Link copied to clipboard
common
open infix fun MST.pow(pow: Number): MST
Raises this value to the power pow.
times
Link copied to clipboard
common
open operator fun MST.times(other: MST): MST
open operator fun MST.times(other: MST): MST
open operator fun MST.times(other: MST): MST
Multiplies this element by scalar.
open operator fun MST.times(k: Number): MST
open operator fun MST.times(k: Number): MST
open operator fun MST.times(k: Number): MST
open operator fun MST.times(k: Number): MST
Multiplication of this element by a scalar.
toExpression
Link copied to clipboard
common
fun <T : Any> MST.toExpression(algebra: Algebra<T>): Expression<T>
Interpret this MST as expression.
unaryMinus
Link copied to clipboard
common
open operator override fun MST.unaryMinus(): MST.Unary
The negation of this element.
open operator override fun MST.unaryMinus(): MST.Unary
The negation of this element.
open operator override fun MST.unaryMinus(): MST.Unary
The negation of this element.
open operator override fun MST.unaryMinus(): MST.Unary
The negation of this element.
unaryPlus
Link copied to clipboard
common
open operator override fun MST.unaryPlus(): MST.Unary
Returns this value.
open operator override fun MST.unaryPlus(): MST.Unary
Returns this value.
open operator override fun MST.unaryPlus(): MST.Unary
Returns this value.
open operator override fun MST.unaryPlus(): MST.Unary
Returns this value.
xor
Link copied to clipboard
common
open infix override fun MST.xor(other: MST): MST
Logic 'xor'

Sources

common source
Link copied to clipboard