Algebra

interface Algebra<T>

Represents an algebraic structure.

Parameters

T

the type of element of this structure.

Functions

binaryOperation
Link copied to clipboard
common
open fun binaryOperation(operation: String, left: T, right: T): T
Dynamically invokes a binary operation with the certain name.
binaryOperationFunction
Link copied to clipboard
common
open fun binaryOperationFunction(operation: String): (T, T) -> T
Dynamically dispatches a binary operation with the certain name.
bindSymbol
Link copied to clipboard
common
open fun bindSymbol(value: String): T
The same as bindSymbolOrNull but throws an error if symbol could not be bound
bindSymbolOrNull
Link copied to clipboard
common
open fun bindSymbolOrNull(value: String): T?
Wraps a raw string to T object.
unaryOperation
Link copied to clipboard
common
open fun unaryOperation(operation: String, arg: T): T
Dynamically invokes a unary operation with the certain name.
unaryOperationFunction
Link copied to clipboard
common
open fun unaryOperationFunction(operation: String): (T) -> T
Dynamically dispatches a unary operation with the certain name.

Inheritors

ExpressionAlgebra
Link copied to clipboard
GroupOperations
Link copied to clipboard
BufferAlgebra
Link copied to clipboard
LogicAlgebra
Link copied to clipboard
NumericAlgebra
Link copied to clipboard
ScaleOperations
Link copied to clipboard
TrigonometricOperations
Link copied to clipboard
PowerOperations
Link copied to clipboard
ExponentialOperations
Link copied to clipboard

Extensions

bindSymbol
Link copied to clipboard
common
fun <T> Algebra<T>.bindSymbol(symbol: Symbol): T
bindSymbolOrNull
Link copied to clipboard
common
fun <T> Algebra<T>.bindSymbolOrNull(symbol: Symbol): T?
evaluate
Link copied to clipboard
common
fun <T> Algebra<T>.evaluate(node: MST): T
Interprets the MST node with this Algebra.

Sources

common source
Link copied to clipboard