MST

sealed class 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.
Symbolic
Link copied to clipboard
common
data class Symbolic(value: String) : MST
A node containing raw string.
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
MST
Link copied to clipboard

Extensions

div
Link copied to clipboard
common
open operator fun MST.div(b: MST): MST
open operator fun MST.div(b: 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 : Any> MST.interpret(algebra: Algebra<T>, arguments: Map<Symbol, T>): T
Interprets the MST node with this Algebra and optional arguments
fun <T : Any> 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(b: MST): MST.Binary
Subtraction of two elements.
open operator override fun MST.minus(b: MST): MST.Binary
open operator override fun MST.minus(b: MST): MST.Binary
open operator override fun MST.minus(b: MST): MST.Binary
open operator fun MST.minus(b: Number): MST
open operator fun MST.minus(b: Number): MST
Subtraction of element from number.
plus
Link copied to clipboard
common
open operator fun MST.plus(b: MST): MST
open operator fun MST.plus(b: MST): MST
open operator fun MST.plus(b: MST): MST
open operator fun MST.plus(b: MST): MST
Addition of two elements.
open operator fun MST.plus(b: Number): MST
open operator fun MST.plus(b: 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(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.
open operator fun MST.times(b: MST): MST
open operator fun MST.times(b: MST): MST
open operator fun MST.times(b: MST): MST
Multiplies this element by 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
open operator override fun MST.unaryMinus(): MST.Unary
open operator override fun MST.unaryMinus(): MST.Unary
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
open operator override fun MST.unaryPlus(): MST.Unary
open operator override fun MST.unaryPlus(): MST.Unary