All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmTest.TestMinimize.kt Maven / Gradle / Ivy

There is a newer version: 0.4.5-alpha6
Show newest version
import org.openrndr.extra.gradientdescent.minimize
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe

object TestMinimize : Spek({
    describe("a simple 1d function") {
        fun parabola(x: DoubleArray): Double {
            return (x[0]+1) * (x[0]+1)
        }
        it("it can be minimized") {
            val result = minimize(doubleArrayOf(10.0), f = ::parabola)
        }
    }
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy