FunctionalExpressionAlgebra

abstract class FunctionalExpressionAlgebra<T, A : Algebra<T>>(algebra: A) : ExpressionAlgebra<T, Expression<T>>

A context class for Expression construction.

Parameters

algebra

The algebra to provide for Expressions built.

Constructors

FunctionalExpressionAlgebra
Link copied to clipboard
common
fun <A : Algebra<T>> FunctionalExpressionAlgebra(algebra: A)
The algebra to provide for Expressions built.

Functions

binaryOperation
Link copied to clipboard
common
open fun binaryOperation(operation: String, left: Expression<T>, right: Expression<T>): Expression<T>
Dynamically invokes a binary operation with the certain name.
binaryOperationFunction
Link copied to clipboard
common
open override fun binaryOperationFunction(operation: String): (left: Expression<T>, right: Expression<T>) -> Expression<T>
Builds an Expression of dynamic call of binary operation operation on left and right.
bindSymbol
Link copied to clipboard
common
open fun bindSymbol(value: String): Expression<T>
The same as bindSymbolOrNull but throws an error if symbol could not be bound
bindSymbolOrNull
Link copied to clipboard
common
open override fun bindSymbolOrNull(value: String): Expression<T>?
Builds an Expression to access a variable.
const
Link copied to clipboard
common
open override fun const(value: T): Expression<T>
Builds an Expression of constant expression which does not depend on arguments.
unaryOperation
Link copied to clipboard
common
open fun unaryOperation(operation: String, arg: Expression<T>): Expression<T>
Dynamically invokes an unary operation with the certain name.
unaryOperationFunction
Link copied to clipboard
common
open override fun unaryOperationFunction(operation: String): (arg: Expression<T>) -> Expression<T>
Builds an Expression of dynamic call of unary operation with name operation on arg.

Properties

algebra
Link copied to clipboard
common
val algebra: A
The algebra to provide for Expressions built.

Inheritors

FunctionalExpressionGroup
Link copied to clipboard