Dev #127
@ -4,7 +4,7 @@ import scientifik.kmath.expressions.Expression
|
|||||||
import scientifik.kmath.operations.NumericAlgebra
|
import scientifik.kmath.operations.NumericAlgebra
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The expression evaluates MST on-flight
|
* The expression evaluates MST on-flight. Should be much faster than functional expression, but slower than ASM-generated expressions.
|
||||||
*/
|
*/
|
||||||
class MSTExpression<T>(val algebra: NumericAlgebra<T>, val mst: MST) : Expression<T> {
|
class MSTExpression<T>(val algebra: NumericAlgebra<T>, val mst: MST) : Expression<T> {
|
||||||
|
|
||||||
|
@ -12,6 +12,9 @@ import scientifik.kmath.operations.PowerOperations
|
|||||||
import scientifik.kmath.operations.RingOperations
|
import scientifik.kmath.operations.RingOperations
|
||||||
import scientifik.kmath.operations.SpaceOperations
|
import scientifik.kmath.operations.SpaceOperations
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO move to common
|
||||||
|
*/
|
||||||
private object ArithmeticsEvaluator : Grammar<MST>() {
|
private object ArithmeticsEvaluator : Grammar<MST>() {
|
||||||
val num by token("-?[\\d.]+(?:[eE]-?\\d+)?")
|
val num by token("-?[\\d.]+(?:[eE]-?\\d+)?")
|
||||||
val lpar by token("\\(")
|
val lpar by token("\\(")
|
||||||
|
Loading…
Reference in New Issue
Block a user