Symbol

interface Symbol : MST(source)

A marker interface for a symbol. A symbol must have an identity with equality relation based on it. Other properties are to store additional, transient data only.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open infix override fun MST.and(other: MST): MST

Logic 'and'

Link copied to clipboard
open operator fun MST.div(arg: MST): MST

Division of two elements.

open operator fun MST.div(k: Number): MST

Division of this element by scalar.

Link copied to clipboard
fun <T> MST.interpret(algebra: Algebra<T>, vararg arguments: Pair<Symbol, T>): T
fun <T> MST.interpret(algebra: Algebra<T>, arguments: Map<Symbol, T>): T

Interprets the MST node with this Algebra and optional arguments

Link copied to clipboard
open operator override fun MST.minus(arg: MST): MST.Binary
open operator override fun MST.minus(arg: MST): MST.Binary
open operator override fun MST.minus(arg: MST): MST.Binary
open operator override fun MST.minus(arg: MST): MST.Binary

Subtraction of two elements.

open operator fun MST.minus(other: Number): MST

Subtraction of element from number.

Link copied to clipboard
open operator override fun MST.not(): MST

Logic 'not'

Link copied to clipboard
open infix override fun MST.or(other: MST): MST

Logic 'or'

Link copied to clipboard
open operator fun MST.plus(arg: MST): MST

Addition of two elements.

open operator fun MST.plus(other: Number): MST

Addition of element and scalar.

Link copied to clipboard
open infix fun MST.pow(pow: Number): MST

Raises this value to the power pow.

Link copied to clipboard
open operator fun MST.times(arg: MST): MST

Multiplies this element by scalar.

open operator fun MST.times(k: Number): MST

Multiplication of this element by a scalar.

Link copied to clipboard
fun <T : Any> MST.toExpression(algebra: Algebra<T>): Expression<T>

Interpret this MST as expression.

Link copied to clipboard
open operator override fun MST.unaryMinus(): MST.Unary
open operator override fun MST.unaryMinus(): MST.Unary
open operator override fun MST.unaryMinus(): MST.Unary
open operator override fun MST.unaryMinus(): MST.Unary

The negation of this element.

Link copied to clipboard
open operator override fun MST.unaryPlus(): MST.Unary
open operator override fun MST.unaryPlus(): MST.Unary
open operator override fun MST.unaryPlus(): MST.Unary
open operator override fun MST.unaryPlus(): MST.Unary

Returns this value.

Link copied to clipboard
open infix override fun MST.xor(other: MST): MST

Logic 'xor'

Properties

Link copied to clipboard
abstract val identity: String

Identity object for the symbol. Two symbols with the same identity are considered to be the same symbol.