Package space.kscience.kmath.ast

Types

ArithmeticsEvaluator
Link copied to clipboard
object ArithmeticsEvaluator : Grammar<MST>
better-parse implementation of grammar defined in the ArithmeticsEvaluator.g4.
MST
Link copied to clipboard
common
sealed class MST
A Mathematical Syntax Tree (MST) node for mathematical expressions.
MstAlgebra
Link copied to clipboard
common
object MstAlgebra : NumericAlgebra<MST>
Algebra over MST nodes.
MstExpression
Link copied to clipboard
common
class MstExpression<T, out A : Algebra<T>>(algebra: A, mst: MST) : Expression<T>
The expression evaluates MST on-flight.
MstExtendedField
Link copied to clipboard
common
object MstExtendedField : ExtendedField<MST> , NumericAlgebra<MST>
ExtendedField over MST nodes.
MstField
Link copied to clipboard
common
object MstField : Field<MST> , RingWithNumbers<MST>
Field over MST nodes.
MstRing
Link copied to clipboard
common
object MstRing : Ring<MST> , RingWithNumbers<MST>
Ring over MST nodes.
MstSpace
Link copied to clipboard
common
object MstSpace : Space<MST> , NumericAlgebra<MST>
Space over MST nodes.

Functions

evaluate
Link copied to clipboard
common
fun <T> Algebra<T>.evaluate(node: MST): T
Interprets the MST node with this Algebra.
interpret
Link copied to clipboard
common
fun <T> MST.interpret(algebra: Algebra<T>): T
Interprets the MST node with this Algebra.
mst
Link copied to clipboard
common
inline fun <T : Any, A : Algebra<T>, E : Algebra<MST>> A.mst(mstAlgebra: E, block: E.() -> MST): MstExpression<T, A>
Builds MstExpression over Algebra.
mstInExtendedField
Link copied to clipboard
common
inline fun <T : Any, A : ExtendedField<T>> A.mstInExtendedField(block: MstExtendedField.() -> MST): MstExpression<T, A>
Builds MstExpression over ExtendedField.
inline fun <T : Any, A : ExtendedField<T>> FunctionalExpressionExtendedField<T, A>.mstInExtendedField(block: MstExtendedField.() -> MST): MstExpression<T, A>
Builds MstExpression over FunctionalExpressionExtendedField.
mstInField
Link copied to clipboard
common
inline fun <T : Any, A : Field<T>> A.mstInField(block: MstField.() -> MST): MstExpression<T, A>
Builds MstExpression over Field.
inline fun <T : Any, A : Field<T>> FunctionalExpressionField<T, A>.mstInField(block: MstField.() -> MST): MstExpression<T, A>
Builds MstExpression over FunctionalExpressionField.
mstInRing
Link copied to clipboard
common
inline fun <T : Any, A : Ring<T>> A.mstInRing(block: MstRing.() -> MST): MstExpression<T, A>
Builds MstExpression over Ring.
inline fun <T : Any, A : Ring<T>> FunctionalExpressionRing<T, A>.mstInRing(block: MstRing.() -> MST): MstExpression<T, A>
Builds MstExpression over FunctionalExpressionRing.
mstInSpace
Link copied to clipboard
common
inline fun <T : Any, A : Space<T>> A.mstInSpace(block: MstSpace.() -> MST): MstExpression<T, A>
Builds MstExpression over Space.
inline fun <T : Any, A : Space<T>> FunctionalExpressionSpace<T, A>.mstInSpace(block: MstSpace.() -> MST): MstExpression<T, A>
Builds MstExpression over FunctionalExpressionSpace.
parseMath
Link copied to clipboard
fun String.parseMath(): MST
Parses the string into MST using ArithmeticsEvaluator.
tryParseMath
Link copied to clipboard
fun String.tryParseMath(): ParseResult<MST>
Tries to parse the string into MST using ArithmeticsEvaluator.