DSAlgebra

abstract class DSAlgebra<T, A : Ring<T>>(val algebra: A, val order: Int, bindings: Map<Symbol, T>) : ExpressionAlgebra<T, DS<T, A>> , SymbolIndexer(source)

Inheritors

Constructors

Link copied to clipboard
constructor(algebra: A, order: Int, bindings: Map<Symbol, T>)

Types

Link copied to clipboard
inner class DSSymbol : Symbol, DS<T, A>

A class implementing both DS and Symbol.

Functions

Link copied to clipboard
open fun binaryOperation(operation: String, left: DS<T, A>, right: DS<T, A>): DS<T, A>

Dynamically invokes a binary operation with the certain name.

Link copied to clipboard
open fun binaryOperationFunction(operation: String): (left: DS<T, A>, right: DS<T, A>) -> DS<T, A>

Dynamically dispatches a binary operation with the certain name.

Link copied to clipboard
open override fun bindSymbol(value: String): DSAlgebra.DSSymbol<T, A>

The same as bindSymbolOrNull but throws an error if symbol could not be bound

Link copied to clipboard
fun <T> Algebra<T>.bindSymbol(symbol: Symbol): T
Link copied to clipboard
open override fun bindSymbolOrNull(value: String): DSAlgebra.DSSymbol<T, A>?

Wraps a raw string to T object. This method is designed for three purposes:

Link copied to clipboard
fun <T> Algebra<T>.bindSymbolOrNull(symbol: Symbol): T?
Link copied to clipboard
open override fun const(value: T): DS<T, A>

A constant expression that does not depend on arguments.

Link copied to clipboard
fun DS<T, A>.derivative(vararg symbols: Symbol): T
fun DS<T, A>.derivative(symbols: List<Symbol>): T
Link copied to clipboard
open fun export(arg: DS<T, A>): DS<T, A>

Export an algebra element, so it could be accessed even after algebra scope is closed. This method must be used on algebras where data is stored externally or any local algebra state is used. By default (if not overridden), exports the object itself.

Link copied to clipboard
open operator fun <T> Array<T>.get(symbol: Symbol): T
open operator fun DoubleArray.get(symbol: Symbol): Double
open operator fun <T> List<T>.get(symbol: Symbol): T
open operator fun <T> Point<T>.get(symbol: Symbol): T
open operator fun <T> Structure2D<T>.get(rowSymbol: Symbol, columnSymbol: Symbol): T
Link copied to clipboard
open fun indexOf(symbol: Symbol): Int
Link copied to clipboard
fun ofDerivatives(vararg derivatives: T): DS<T, A>

Build an instance from all its derivatives.

Link copied to clipboard
Link copied to clipboard
open fun <T> Map<Symbol, T>.toList(): List<T>
Link copied to clipboard
open fun <T> Point<T>.toMap(): Map<Symbol, T>
Link copied to clipboard
open fun <T> Map<Symbol, T>.toPoint(bufferFactory: BufferFactory<T>): Point<T>
Link copied to clipboard
open fun unaryOperation(operation: String, arg: DS<T, A>): DS<T, A>

Dynamically invokes a unary operation with the certain name.

Link copied to clipboard
open fun unaryOperationFunction(operation: String): (arg: DS<T, A>) -> DS<T, A>

Dynamically dispatches a unary operation with the certain name.

Link copied to clipboard
fun variable(index: Int, value: T): DS<T, A>

Build an instance representing a variable.

Properties

Link copied to clipboard
val algebra: A
Link copied to clipboard

Bind a symbol by name inside the ExpressionAlgebra

Link copied to clipboard

Provide a factory for buffers, associated with this Algebra

Link copied to clipboard
val order: Int
Link copied to clipboard
open override val symbols: List<Symbol>