From ef7066b8c94d0c9450d2b1a0f1eeb79ffb27fdc9 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Fri, 30 Oct 2020 16:40:58 +0700 Subject: [PATCH] Update example --- .../src/main/kotlin/kscience/kmath/ast/KotlingradSupport.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/src/main/kotlin/kscience/kmath/ast/KotlingradSupport.kt b/examples/src/main/kotlin/kscience/kmath/ast/KotlingradSupport.kt index 9b34426f7..5fbb5b86a 100644 --- a/examples/src/main/kotlin/kscience/kmath/ast/KotlingradSupport.kt +++ b/examples/src/main/kotlin/kscience/kmath/ast/KotlingradSupport.kt @@ -5,6 +5,7 @@ import kscience.kmath.expressions.invoke import kscience.kmath.expressions.symbol import kscience.kmath.kotlingrad.DifferentiableMstExpression import kscience.kmath.kotlingrad.derivative +import kscience.kmath.kotlingrad.differentiable import kscience.kmath.operations.RealField /** @@ -14,7 +15,8 @@ import kscience.kmath.operations.RealField fun main() { val x by symbol - val actualDerivative = DifferentiableMstExpression(RealField, "x^2-4*x-44".parseMath()) + val actualDerivative = MstExpression(RealField, "x^2-4*x-44".parseMath()) + .differentiable() .derivative(x) .compile()