diff --git a/.gitignore b/.gitignore
index 07589aa00..d6c4af4e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,12 @@
.gradle
build/
out/
+
.idea/
+
+!.idea/copyright/
+!.idea/scopes/
+
.vscode/
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
diff --git a/.idea/copyright/kmath.xml b/.idea/copyright/kmath.xml
new file mode 100644
index 000000000..17e44e4d0
--- /dev/null
+++ b/.idea/copyright/kmath.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 000000000..b538bdf41
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/scopes/Apply_copyright.xml b/.idea/scopes/Apply_copyright.xml
new file mode 100644
index 000000000..0eb589133
--- /dev/null
+++ b/.idea/scopes/Apply_copyright.xml
@@ -0,0 +1,4 @@
+
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fdace591c..7464695ec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@
- Basic integration API
- Basic MPP distributions and samplers
- bindSymbolOrNull
+- Blocking chains and Statistics
+- Multiplatform integration
+- Integration for any Field element
+- Extendend operations for ND4J fields
### Changed
- Exponential operations merged with hyperbolic functions
@@ -18,6 +22,8 @@
- DataSets are moved from functions to core
- Redesign advanced Chain API
- Redesign MST. Remove MSTExpression.
+- Move MST to core
+- Separated benchmarks and examples
### Deprecated
@@ -28,6 +34,7 @@
- MSTExpression
### Fixed
+- Ring inherits RingOperations, not GroupOperations
### Security
diff --git a/README.md b/README.md
index 7b78d4531..773eb6398 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,8 @@ Python's NumPy library. Later we found that kotlin is much more flexible languag
designs. In contrast to `numpy` and `scipy` it is modular and has a lightweight core. The `numpy`-like experience could
be achieved with [kmath-for-real](/kmath-for-real) extension module.
+[Documentation site (**WIP**)](https://mipt-npm.github.io/kmath/)
+
## Publications and talks
* [A conceptual article about context-oriented design](https://proandroiddev.com/an-introduction-context-oriented-programming-in-kotlin-2e79d316b0a2)
@@ -74,6 +76,12 @@ KMath is a modular library. Different modules provide different features with di
+* ### [benchmarks](benchmarks)
+>
+>
+> **Maturity**: EXPERIMENTAL
+
+
* ### [examples](examples)
>
>
@@ -86,12 +94,10 @@ KMath is a modular library. Different modules provide different features with di
> **Maturity**: PROTOTYPE
>
> **Features:**
-> - [expression-language](kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt) : Expression language and its parser
-> - [mst](kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt) : MST (Mathematical Syntax Tree) as expression language's syntax intermediate representation
-> - [mst-building](kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt) : MST building algebraic structure
-> - [mst-interpreter](kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt) : MST interpreter
+> - [expression-language](kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt) : Expression language and its parser
> - [mst-jvm-codegen](kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt) : Dynamic MST to JVM bytecode compiler
> - [mst-js-codegen](kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt) : Dynamic MST to JS compiler
+> - [rendering](kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt) : Extendable MST rendering
@@ -169,15 +175,16 @@ One can still use generic algebras though.
* ### [kmath-functions](kmath-functions)
-> Functions and interpolation
+> Functions, integration and interpolation
>
-> **Maturity**: PROTOTYPE
+> **Maturity**: EXPERIMENTAL
>
> **Features:**
-> - [piecewise](kmath-functions/Piecewise functions.) : src/commonMain/kotlin/space/kscience/kmath/functions/Piecewise.kt
-> - [polynomials](kmath-functions/Polynomial functions.) : src/commonMain/kotlin/space/kscience/kmath/functions/Polynomial.kt
-> - [linear interpolation](kmath-functions/Linear XY interpolator.) : src/commonMain/kotlin/space/kscience/kmath/interpolation/LinearInterpolator.kt
-> - [spline interpolation](kmath-functions/Cubic spline XY interpolator.) : src/commonMain/kotlin/space/kscience/kmath/interpolation/SplineInterpolator.kt
+> - [piecewise](kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/Piecewise.kt) : Piecewise functions.
+> - [polynomials](kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/Polynomial.kt) : Polynomial functions.
+> - [linear interpolation](kmath-functions/src/commonMain/kotlin/space/kscience/kmath/interpolation/LinearInterpolator.kt) : Linear XY interpolator.
+> - [spline interpolation](kmath-functions/src/commonMain/kotlin/space/kscience/kmath/interpolation/SplineInterpolator.kt) : Cubic spline XY interpolator.
+> - [integration](kmath-functions/#) : Univariate and multivariate quadratures
@@ -248,6 +255,10 @@ cases. We expect the worst KMath benchmarks will perform better than native Pyth
native/SciPy (mostly due to boxing operations on primitive numbers). The best performance of optimized parts could be
better than SciPy.
+## Requirements
+
+KMath currently relies on JDK 11 for compilation and execution of Kotlin-JVM part. We recommend to use GraalVM-CE 11 for execution in order to get better performance.
+
### Repositories
Release and development artifacts are accessible from mipt-npm [Space](https://www.jetbrains.com/space/) repository `https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven` (see documentation of
@@ -259,8 +270,8 @@ repositories {
}
dependencies {
- api("space.kscience:kmath-core:0.3.0-dev-4")
- // api("kscience.kmath:kmath-core-jvm:0.3.0-dev-4") for jvm-specific version
+ api("space.kscience:kmath-core:0.3.0-dev-7")
+ // api("space.kscience:kmath-core-jvm:0.3.0-dev-7") for jvm-specific version
}
```
diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts
new file mode 100644
index 000000000..88f034a2a
--- /dev/null
+++ b/benchmarks/build.gradle.kts
@@ -0,0 +1,130 @@
+plugins {
+ kotlin("multiplatform")
+ kotlin("plugin.allopen")
+ id("org.jetbrains.kotlinx.benchmark")
+}
+
+allOpen.annotation("org.openjdk.jmh.annotations.State")
+sourceSets.register("benchmarks")
+
+repositories {
+ mavenCentral()
+ jcenter()
+ maven("https://repo.kotlin.link")
+ maven("https://clojars.org/repo")
+ maven("https://dl.bintray.com/egor-bogomolov/astminer/")
+ maven("https://dl.bintray.com/hotkeytlt/maven")
+ maven("https://jitpack.io")
+ maven {
+ setUrl("http://logicrunch.research.it.uu.se/maven/")
+ isAllowInsecureProtocol = true
+ }
+}
+
+kotlin {
+ jvm()
+
+ sourceSets {
+ val commonMain by getting {
+ dependencies {
+ implementation(project(":kmath-ast"))
+ implementation(project(":kmath-core"))
+ implementation(project(":kmath-coroutines"))
+ implementation(project(":kmath-complex"))
+ implementation(project(":kmath-stat"))
+ implementation(project(":kmath-dimensions"))
+ implementation(project(":kmath-for-real"))
+ implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.3.0")
+ }
+ }
+
+ val jvmMain by getting {
+ dependencies {
+ implementation(project(":kmath-commons"))
+ implementation(project(":kmath-ejml"))
+ implementation(project(":kmath-nd4j"))
+ implementation(project(":kmath-kotlingrad"))
+ implementation(project(":kmath-viktor"))
+ implementation("org.nd4j:nd4j-native:1.0.0-beta7")
+
+ // uncomment if your system supports AVX2
+ // val os = System.getProperty("os.name")
+ //
+ // if (System.getProperty("os.arch") in arrayOf("x86_64", "amd64")) when {
+ // os.startsWith("Windows") -> implementation("org.nd4j:nd4j-native:1.0.0-beta7:windows-x86_64-avx2")
+ // os == "Linux" -> implementation("org.nd4j:nd4j-native:1.0.0-beta7:linux-x86_64-avx2")
+ // os == "Mac OS X" -> implementation("org.nd4j:nd4j-native:1.0.0-beta7:macosx-x86_64-avx2")
+ // } else
+ // implementation("org.nd4j:nd4j-native-platform:1.0.0-beta7")
+ }
+ }
+ }
+}
+
+// Configure benchmark
+benchmark {
+ // Setup configurations
+ targets {
+ register("jvm")
+ }
+
+ fun kotlinx.benchmark.gradle.BenchmarkConfiguration.commonConfiguration() {
+ warmups = 1
+ iterations = 5
+ iterationTime = 1000
+ iterationTimeUnit = "ms"
+ }
+
+ configurations.register("buffer") {
+ commonConfiguration()
+ include("BufferBenchmark")
+ }
+
+ configurations.register("dot") {
+ commonConfiguration()
+ include("DotBenchmark")
+ }
+
+ configurations.register("expressions") {
+ commonConfiguration()
+ include("ExpressionsInterpretersBenchmark")
+ }
+
+ configurations.register("matrixInverse") {
+ commonConfiguration()
+ include("MatrixInverseBenchmark")
+ }
+
+ configurations.register("bigInt") {
+ commonConfiguration()
+ include("BigIntBenchmark")
+ }
+}
+
+// Fix kotlinx-benchmarks bug
+afterEvaluate {
+ val jvmBenchmarkJar by tasks.getting(org.gradle.jvm.tasks.Jar::class) {
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+ }
+}
+
+
+kotlin.sourceSets.all {
+ with(languageSettings) {
+ useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts")
+ useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
+ useExperimentalAnnotation("space.kscience.kmath.misc.UnstableKMathAPI")
+ }
+}
+
+tasks.withType {
+ kotlinOptions {
+ jvmTarget = "11"
+ freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all"
+ }
+}
+
+
+readme {
+ maturity = ru.mipt.npm.gradle.Maturity.EXPERIMENTAL
+}
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt
similarity index 86%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt
index 43b698c03..ff933997f 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BigIntBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BigIntBenchmark.kt
new file mode 100644
index 000000000..2076aedc7
--- /dev/null
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BigIntBenchmark.kt
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.benchmarks
+
+
+import kotlinx.benchmark.Blackhole
+import org.openjdk.jmh.annotations.Benchmark
+import org.openjdk.jmh.annotations.Scope
+import org.openjdk.jmh.annotations.State
+import space.kscience.kmath.operations.BigInt
+import space.kscience.kmath.operations.BigIntField
+import space.kscience.kmath.operations.JBigIntegerField
+import space.kscience.kmath.operations.invoke
+
+private fun BigInt.pow(power: Int): BigInt = modPow(BigIntField.number(power), BigInt.ZERO)
+
+@State(Scope.Benchmark)
+internal class BigIntBenchmark {
+
+ val kmNumber = BigIntField.number(Int.MAX_VALUE)
+ val jvmNumber = JBigIntegerField.number(Int.MAX_VALUE)
+ val largeKmNumber = BigIntField { number(11).pow(100_000) }
+ val largeJvmNumber = JBigIntegerField { number(11).pow(100_000) }
+ val bigExponent = 50_000
+
+ @Benchmark
+ fun kmAdd(blackhole: Blackhole) = BigIntField {
+ blackhole.consume(kmNumber + kmNumber + kmNumber)
+ }
+
+ @Benchmark
+ fun jvmAdd(blackhole: Blackhole) = JBigIntegerField {
+ blackhole.consume(jvmNumber + jvmNumber + jvmNumber)
+ }
+
+ @Benchmark
+ fun kmMultiply(blackhole: Blackhole) = BigIntField {
+ blackhole.consume(kmNumber * kmNumber * kmNumber)
+ }
+
+ @Benchmark
+ fun kmMultiplyLarge(blackhole: Blackhole) = BigIntField {
+ blackhole.consume(largeKmNumber*largeKmNumber)
+ }
+
+ @Benchmark
+ fun jvmMultiply(blackhole: Blackhole) = JBigIntegerField {
+ blackhole.consume(jvmNumber * jvmNumber * jvmNumber)
+ }
+
+ @Benchmark
+ fun jvmMultiplyLarge(blackhole: Blackhole) = JBigIntegerField {
+ blackhole.consume(largeJvmNumber*largeJvmNumber)
+ }
+
+// @Benchmark
+// fun kmPower(blackhole: Blackhole) = BigIntField {
+// blackhole.consume(kmNumber.pow(bigExponent))
+// }
+//
+// @Benchmark
+// fun jvmPower(blackhole: Blackhole) = JBigIntegerField {
+// blackhole.consume(jvmNumber.pow(bigExponent))
+// }
+}
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt
similarity index 84%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt
index 1db1d77dc..39819d407 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt
similarity index 91%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt
index 6a2126dc1..23e73cb5f 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt
new file mode 100644
index 000000000..942fba308
--- /dev/null
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.benchmarks
+
+import kotlinx.benchmark.Benchmark
+import kotlinx.benchmark.Blackhole
+import kotlinx.benchmark.Scope
+import kotlinx.benchmark.State
+import space.kscience.kmath.asm.compileToExpression
+import space.kscience.kmath.expressions.*
+import space.kscience.kmath.misc.Symbol
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.random.Random
+
+@State(Scope.Benchmark)
+internal class ExpressionsInterpretersBenchmark {
+ @Benchmark
+ fun functionalExpression(blackhole: Blackhole) = invokeAndSum(functional, blackhole)
+
+ @Benchmark
+ fun mstExpression(blackhole: Blackhole) = invokeAndSum(mst, blackhole)
+
+ @Benchmark
+ fun asmExpression(blackhole: Blackhole) = invokeAndSum(asm, blackhole)
+
+ @Benchmark
+ fun rawExpression(blackhole: Blackhole) = invokeAndSum(raw, blackhole)
+
+ private fun invokeAndSum(expr: Expression, blackhole: Blackhole) {
+ val random = Random(0)
+ var sum = 0.0
+
+ repeat(times) {
+ sum += expr(x to random.nextDouble())
+ }
+
+ blackhole.consume(sum)
+ }
+
+ private companion object {
+ private val x: Symbol by symbol
+ private val algebra: DoubleField = DoubleField
+ private const val times = 1_000_000
+
+ private val functional: Expression = DoubleField.expressionInExtendedField {
+ bindSymbol(x) * number(2.0) + number(2.0) / bindSymbol(x) - number(16.0) / sin(bindSymbol(x))
+ }
+
+ private val node = MstExtendedField {
+ bindSymbol(x) * 2.0 + number(2.0) / bindSymbol(x) - number(16.0) / sin(bindSymbol(x))
+ }
+
+ private val mst: Expression = node.toExpression(DoubleField)
+ private val asm: Expression = node.compileToExpression(DoubleField)
+
+ private val raw: Expression = Expression { args ->
+ args.getValue(x) * 2.0 + 2.0 / args.getValue(x) - 16.0 / kotlin.math.sin(args.getValue(x))
+ }
+ }
+}
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt
similarity index 89%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt
index 7aa8ac975..d1803e389 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt
similarity index 89%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt
index 09c415d9a..5e0c6735f 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt
similarity index 91%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt
index fd0188bd6..d2359a791 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt
similarity index 90%
rename from examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt
rename to benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt
index b6bd036ba..eac8634f5 100644
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt
+++ b/benchmarks/src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.benchmarks
import kotlinx.benchmark.Benchmark
diff --git a/build.gradle.kts b/build.gradle.kts
index 59e93e67f..4e0b6f256 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,3 @@
-import org.jetbrains.dokka.gradle.DokkaTask
-import ru.mipt.npm.gradle.KSciencePublishingPlugin
-import java.net.URL
-
plugins {
id("ru.mipt.npm.gradle.project")
}
@@ -13,19 +9,21 @@ allprojects {
maven("https://dl.bintray.com/egor-bogomolov/astminer/")
maven("https://dl.bintray.com/hotkeytlt/maven")
maven("https://jitpack.io")
- maven("http://logicrunch.research.it.uu.se/maven/")
+ maven("http://logicrunch.research.it.uu.se/maven/") {
+ isAllowInsecureProtocol = true
+ }
mavenCentral()
}
group = "space.kscience"
- version = "0.3.0-dev-5"
+ version = "0.3.0-dev-7"
}
subprojects {
- if (name.startsWith("kmath")) apply()
+ if (name.startsWith("kmath")) apply()
afterEvaluate {
- tasks.withType {
+ tasks.withType {
dokkaSourceSets.all {
val readmeFile = File(this@subprojects.projectDir, "./README.md")
if (readmeFile.exists())
@@ -35,7 +33,7 @@ subprojects {
"http://ejml.org/javadoc/",
"https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/",
"https://deeplearning4j.org/api/latest/"
- ).map { URL("${it}package-list") to URL(it) }.forEach { (a, b) ->
+ ).map { java.net.URL("${it}package-list") to java.net.URL(it) }.forEach { (a, b) ->
externalDocumentationLink {
packageListUrl.set(a)
url.set(b)
diff --git a/docs/templates/README-TEMPLATE.md b/docs/templates/README-TEMPLATE.md
index 3502cdccd..99951b4d6 100644
--- a/docs/templates/README-TEMPLATE.md
+++ b/docs/templates/README-TEMPLATE.md
@@ -11,6 +11,8 @@ Python's NumPy library. Later we found that kotlin is much more flexible languag
designs. In contrast to `numpy` and `scipy` it is modular and has a lightweight core. The `numpy`-like experience could
be achieved with [kmath-for-real](/kmath-for-real) extension module.
+[Documentation site (**WIP**)](https://mipt-npm.github.io/kmath/)
+
## Publications and talks
* [A conceptual article about context-oriented design](https://proandroiddev.com/an-introduction-context-oriented-programming-in-kotlin-2e79d316b0a2)
@@ -92,6 +94,10 @@ cases. We expect the worst KMath benchmarks will perform better than native Pyth
native/SciPy (mostly due to boxing operations on primitive numbers). The best performance of optimized parts could be
better than SciPy.
+## Requirements
+
+KMath currently relies on JDK 11 for compilation and execution of Kotlin-JVM part. We recommend to use GraalVM-CE 11 for execution in order to get better performance.
+
### Repositories
Release and development artifacts are accessible from mipt-npm [Space](https://www.jetbrains.com/space/) repository `https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven` (see documentation of
@@ -104,7 +110,7 @@ repositories {
dependencies {
api("${group}:kmath-core:$version")
- // api("kscience.kmath:kmath-core-jvm:$version") for jvm-specific version
+ // api("${group}:kmath-core-jvm:$version") for jvm-specific version
}
```
diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts
index a48b4d0d9..56feee9dc 100644
--- a/examples/build.gradle.kts
+++ b/examples/build.gradle.kts
@@ -1,27 +1,19 @@
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-
plugins {
kotlin("jvm")
- kotlin("plugin.allopen")
- id("kotlinx.benchmark")
}
-allOpen.annotation("org.openjdk.jmh.annotations.State")
-sourceSets.register("benchmarks")
-
repositories {
+ mavenCentral()
jcenter()
maven("https://repo.kotlin.link")
maven("https://clojars.org/repo")
maven("https://dl.bintray.com/egor-bogomolov/astminer/")
maven("https://dl.bintray.com/hotkeytlt/maven")
- maven("https://dl.bintray.com/kotlin/kotlin-eap")
- maven("https://dl.bintray.com/kotlin/kotlinx")
- maven("https://dl.bintray.com/mipt-npm/dev")
- maven("https://dl.bintray.com/mipt-npm/kscience")
maven("https://jitpack.io")
- maven("http://logicrunch.research.it.uu.se/maven/")
- mavenCentral()
+ maven{
+ setUrl("http://logicrunch.research.it.uu.se/maven/")
+ isAllowInsecureProtocol = true
+ }
}
dependencies {
@@ -39,7 +31,6 @@ dependencies {
implementation(project(":kmath-for-real"))
- implementation("org.deeplearning4j:deeplearning4j-core:1.0.0-beta7")
implementation("org.nd4j:nd4j-native:1.0.0-beta7")
// uncomment if your system supports AVX2
@@ -52,54 +43,9 @@ dependencies {
// } else
implementation("org.nd4j:nd4j-native-platform:1.0.0-beta7")
- implementation("org.jetbrains.kotlinx:kotlinx-io:0.2.0-npm-dev-11")
- implementation("org.jetbrains.kotlinx:kotlinx.benchmark.runtime:0.2.0-dev-20")
implementation("org.slf4j:slf4j-simple:1.7.30")
-
// plotting
- implementation("kscience.plotlykt:plotlykt-server:0.3.1-dev")
-
- "benchmarksImplementation"("org.jetbrains.kotlinx:kotlinx.benchmark.runtime-jvm:0.2.0-dev-20")
- "benchmarksImplementation"(sourceSets.main.get().output + sourceSets.main.get().runtimeClasspath)
-}
-
-// Configure benchmark
-benchmark {
- // Setup configurations
- targets.register("benchmarks")
- // This one matches sourceSet name above
-
- configurations.register("buffer") {
- warmups = 1 // number of warmup iterations
- iterations = 3 // number of iterations
- iterationTime = 500 // time in seconds per iteration
- iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
- include("BufferBenchmark")
- }
-
- configurations.register("dot") {
- warmups = 1 // number of warmup iterations
- iterations = 3 // number of iterations
- iterationTime = 500 // time in seconds per iteration
- iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
- include("DotBenchmark")
- }
-
- configurations.register("expressions") {
- warmups = 1 // number of warmup iterations
- iterations = 3 // number of iterations
- iterationTime = 500 // time in seconds per iteration
- iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
- include("ExpressionsInterpretersBenchmark")
- }
-
- configurations.register("matrixInverse") {
- warmups = 1 // number of warmup iterations
- iterations = 3 // number of iterations
- iterationTime = 500 // time in seconds per iteration
- iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
- include("MatrixInverseBenchmark")
- }
+ implementation("space.kscience:plotlykt-server:0.4.0-dev-2")
}
kotlin.sourceSets.all {
@@ -110,8 +56,11 @@ kotlin.sourceSets.all {
}
}
-tasks.withType {
- kotlinOptions.jvmTarget = "11"
+tasks.withType {
+ kotlinOptions{
+ jvmTarget = "11"
+ freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all"
+ }
}
readme {
diff --git a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt b/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt
deleted file mode 100644
index ad2a57597..000000000
--- a/examples/src/benchmarks/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt
+++ /dev/null
@@ -1,76 +0,0 @@
-package space.kscience.kmath.benchmarks
-
-import kotlinx.benchmark.Benchmark
-import kotlinx.benchmark.Blackhole
-import kotlinx.benchmark.Scope
-import kotlinx.benchmark.State
-import space.kscience.kmath.asm.compileToExpression
-import space.kscience.kmath.ast.MstField
-import space.kscience.kmath.ast.toExpression
-import space.kscience.kmath.expressions.Expression
-import space.kscience.kmath.expressions.expressionInField
-import space.kscience.kmath.expressions.invoke
-import space.kscience.kmath.misc.symbol
-import space.kscience.kmath.operations.DoubleField
-import space.kscience.kmath.operations.bindSymbol
-import space.kscience.kmath.operations.invoke
-import kotlin.random.Random
-
-@State(Scope.Benchmark)
-internal class ExpressionsInterpretersBenchmark {
- @Benchmark
- fun functionalExpression(blackhole: Blackhole) {
- val expr = algebra.expressionInField {
- val x = bindSymbol(x)
- x * const(2.0) + const(2.0) / x - const(16.0)
- }
-
- invokeAndSum(expr, blackhole)
- }
-
- @Benchmark
- fun mstExpression(blackhole: Blackhole) {
- val expr = MstField {
- val x = bindSymbol(x)
- x * 2.0 + number(2.0) / x - 16.0
- }.toExpression(algebra)
-
- invokeAndSum(expr, blackhole)
- }
-
- @Benchmark
- fun asmExpression(blackhole: Blackhole) {
- val expr = MstField {
- val x = bindSymbol(x)
- x * 2.0 + number(2.0) / x - 16.0
- }.compileToExpression(algebra)
-
- invokeAndSum(expr, blackhole)
- }
-
- @Benchmark
- fun rawExpression(blackhole: Blackhole) {
- val expr = Expression { args ->
- val x = args.getValue(x)
- x * 2.0 + 2.0 / x - 16.0
- }
-
- invokeAndSum(expr, blackhole)
- }
-
- private fun invokeAndSum(expr: Expression, blackhole: Blackhole) {
- val random = Random(0)
- var sum = 0.0
-
- repeat(1000000) {
- sum += expr(x to random.nextDouble())
- }
-
- blackhole.consume(sum)
- }
-
- private companion object {
- private val algebra = DoubleField
- private val x by symbol
- }
-}
diff --git a/examples/src/main/kotlin/space/kscience/kmath/ast/astRendering.kt b/examples/src/main/kotlin/space/kscience/kmath/ast/astRendering.kt
index a250ad800..e16769464 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/ast/astRendering.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/ast/astRendering.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast
import space.kscience.kmath.ast.rendering.FeaturedMathRendererWithPostProcess
diff --git a/examples/src/main/kotlin/space/kscience/kmath/ast/expressions.kt b/examples/src/main/kotlin/space/kscience/kmath/ast/expressions.kt
index a4b8b7ca4..918134e04 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/ast/expressions.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/ast/expressions.kt
@@ -1,5 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast
+import space.kscience.kmath.expressions.MstField
+import space.kscience.kmath.expressions.interpret
import space.kscience.kmath.misc.Symbol.Companion.x
import space.kscience.kmath.operations.DoubleField
import space.kscience.kmath.operations.bindSymbol
diff --git a/examples/src/main/kotlin/space/kscience/kmath/ast/kotlingradSupport.kt b/examples/src/main/kotlin/space/kscience/kmath/ast/kotlingradSupport.kt
index fb69177a2..25f42f5a9 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/ast/kotlingradSupport.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/ast/kotlingradSupport.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast
import space.kscience.kmath.asm.compileToExpression
@@ -20,5 +25,5 @@ fun main() {
val expectedDerivative = "2*x-4".parseMath().compileToExpression(DoubleField)
- assert(actualDerivative("x" to 123.0) == expectedDerivative("x" to 123.0))
+ assert(actualDerivative(x to 123.0) == expectedDerivative(x to 123.0))
}
diff --git a/examples/src/main/kotlin/space/kscience/kmath/commons/fit/fitWithAutoDiff.kt b/examples/src/main/kotlin/space/kscience/kmath/commons/fit/fitWithAutoDiff.kt
index 813310680..028985260 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/commons/fit/fitWithAutoDiff.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/commons/fit/fitWithAutoDiff.kt
@@ -1,10 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.fit
import kotlinx.html.br
import kotlinx.html.h3
-import kscience.plotly.*
-import kscience.plotly.models.ScatterMode
-import kscience.plotly.models.TraceValues
import space.kscience.kmath.commons.optimization.chiSquared
import space.kscience.kmath.commons.optimization.minimize
import space.kscience.kmath.distributions.NormalDistribution
@@ -17,6 +19,9 @@ import space.kscience.kmath.real.step
import space.kscience.kmath.stat.RandomGenerator
import space.kscience.kmath.structures.asIterable
import space.kscience.kmath.structures.toList
+import space.kscience.plotly.*
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.models.TraceValues
import kotlin.math.pow
import kotlin.math.sqrt
diff --git a/examples/src/main/kotlin/space/kscience/kmath/functions/integrate.kt b/examples/src/main/kotlin/space/kscience/kmath/functions/integrate.kt
new file mode 100644
index 000000000..6990e8c8f
--- /dev/null
+++ b/examples/src/main/kotlin/space/kscience/kmath/functions/integrate.kt
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.functions
+
+import space.kscience.kmath.integration.integrate
+import space.kscience.kmath.integration.value
+import space.kscience.kmath.operations.DoubleField
+import kotlin.math.pow
+
+fun main() {
+ //Define a function
+ val function: UnivariateFunction = { x -> 3 * x.pow(2) + 2 * x + 1 }
+
+ //get the result of the integration
+ val result = DoubleField.integrate(0.0..10.0, function = function)
+
+ //the value is nullable because in some cases the integration could not succeed
+ println(result.value)
+}
\ No newline at end of file
diff --git a/examples/src/main/kotlin/space/kscience/kmath/functions/matrixIntegration.kt b/examples/src/main/kotlin/space/kscience/kmath/functions/matrixIntegration.kt
new file mode 100644
index 000000000..8020df8f6
--- /dev/null
+++ b/examples/src/main/kotlin/space/kscience/kmath/functions/matrixIntegration.kt
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.functions
+
+import space.kscience.kmath.integration.integrate
+import space.kscience.kmath.integration.value
+import space.kscience.kmath.nd.StructureND
+import space.kscience.kmath.nd.nd
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.invoke
+
+fun main(): Unit = DoubleField {
+ nd(2, 2) {
+
+ //Produce a diagonal StructureND
+ fun diagonal(v: Double) = produce { (i, j) ->
+ if (i == j) v else 0.0
+ }
+
+ //Define a function in a nd space
+ val function: (Double) -> StructureND = { x: Double -> 3 * number(x).pow(2) + 2 * diagonal(x) + 1 }
+
+ //get the result of the integration
+ val result = integrate(0.0..10.0, function = function)
+
+ //the value is nullable because in some cases the integration could not succeed
+ println(result.value)
+ }
+}
\ No newline at end of file
diff --git a/examples/src/main/kotlin/space/kscience/kmath/linear/gradient.kt b/examples/src/main/kotlin/space/kscience/kmath/linear/gradient.kt
index 8940aeac9..a01ea7fe2 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/linear/gradient.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/linear/gradient.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.real.*
@@ -17,8 +22,8 @@ fun main() {
return DoubleBuffer(x.size) { i ->
val h = sigma[i] / 5
val dVector = DoubleBuffer(x.size) { if (it == i) h else 0.0 }
- val f1 = invoke(x + dVector / 2)
- val f0 = invoke(x - dVector / 2)
+ val f1 = this(x + dVector / 2)
+ val f0 = this(x - dVector / 2)
(f1 - f0) / h
}
}
diff --git a/examples/src/main/kotlin/space/kscience/kmath/operations/BigIntDemo.kt b/examples/src/main/kotlin/space/kscience/kmath/operations/BigIntDemo.kt
index 6d5903cae..51f439612 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/operations/BigIntDemo.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/operations/BigIntDemo.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.operations
fun main() {
diff --git a/examples/src/main/kotlin/space/kscience/kmath/operations/ComplexDemo.kt b/examples/src/main/kotlin/space/kscience/kmath/operations/ComplexDemo.kt
index 105fb108e..f99dd8c0e 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/operations/ComplexDemo.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/operations/ComplexDemo.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.operations
import space.kscience.kmath.complex.Complex
diff --git a/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionBenchmark.kt b/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionBenchmark.kt
index 5cf96adaa..8e3cdf86f 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionBenchmark.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionBenchmark.kt
@@ -1,14 +1,19 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.stat
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
+import org.apache.commons.rng.sampling.distribution.BoxMullerNormalizedGaussianSampler
import org.apache.commons.rng.simple.RandomSource
import space.kscience.kmath.samplers.GaussianSampler
import java.time.Duration
import java.time.Instant
import org.apache.commons.rng.sampling.distribution.GaussianSampler as CMGaussianSampler
-import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler as CMZigguratNormalizedGaussianSampler
private suspend fun runKMathChained(): Duration {
val generator = RandomGenerator.fromSource(RandomSource.MT, 123L)
@@ -34,7 +39,7 @@ private fun runApacheDirect(): Duration {
val rng = RandomSource.create(RandomSource.MT, 123L)
val sampler = CMGaussianSampler.of(
- CMZigguratNormalizedGaussianSampler.of(rng),
+ BoxMullerNormalizedGaussianSampler.of(rng),
7.0,
2.0
)
@@ -59,8 +64,8 @@ private fun runApacheDirect(): Duration {
* Comparing chain sampling performance with direct sampling performance
*/
fun main(): Unit = runBlocking(Dispatchers.Default) {
- val chainJob = async { runKMathChained() }
val directJob = async { runApacheDirect() }
+ val chainJob = async { runKMathChained() }
println("KMath Chained: ${chainJob.await()}")
println("Apache Direct: ${directJob.await()}")
}
diff --git a/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionDemo.kt b/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionDemo.kt
index 1e8542bd8..b319766e3 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionDemo.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/stat/DistributionDemo.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.stat
import kotlinx.coroutines.runBlocking
diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/ComplexND.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/ComplexND.kt
index 68af2560b..b30165f71 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/structures/ComplexND.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/structures/ComplexND.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
@file:Suppress("unused")
package space.kscience.kmath.structures
diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/NDField.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/NDField.kt
index f7dc3280a..cc1f5f680 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/structures/NDField.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/structures/NDField.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.structures
import kotlinx.coroutines.GlobalScope
diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/StreamDoubleFieldND.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/StreamDoubleFieldND.kt
index 162c63df9..d53cfa9b9 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/structures/StreamDoubleFieldND.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/structures/StreamDoubleFieldND.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.structures
import space.kscience.kmath.nd.*
diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/StructureReadBenchmark.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/StructureReadBenchmark.kt
index 8b0a2ed0e..0d5358354 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/structures/StructureReadBenchmark.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/structures/StructureReadBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.structures
import space.kscience.kmath.nd.BufferND
diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/StructureWriteBenchmark.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/StructureWriteBenchmark.kt
index 27741be61..dea7095a8 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/structures/StructureWriteBenchmark.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/structures/StructureWriteBenchmark.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.structures
import space.kscience.kmath.nd.StructureND
diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/typeSafeDimensions.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/typeSafeDimensions.kt
index d2d130ab4..955f86fa9 100644
--- a/examples/src/main/kotlin/space/kscience/kmath/structures/typeSafeDimensions.kt
+++ b/examples/src/main/kotlin/space/kscience/kmath/structures/typeSafeDimensions.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.structures
import space.kscience.kmath.dimensions.D2
diff --git a/gradle.properties b/gradle.properties
index 50123b16c..7e9516660 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,8 +1,13 @@
+#
+# Copyright 2018-2021 KMath contributors.
+# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+#
+
kotlin.code.style=official
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.stability.nowarn=true
kotlin.native.enableDependencyPropagation=false
kotlin.parallel.tasks.in.project=true
org.gradle.configureondemand=true
-org.gradle.jvmargs=-XX:MaxMetaspaceSize=9G
+org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G
org.gradle.parallel=true
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 442d9132e..f371643ee 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/kmath-ast/README.md b/kmath-ast/README.md
index 44faa5cd5..eedba16fa 100644
--- a/kmath-ast/README.md
+++ b/kmath-ast/README.md
@@ -2,17 +2,15 @@
Abstract syntax tree expression representation and related optimizations.
- - [expression-language](src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt) : Expression language and its parser
- - [mst](src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt) : MST (Mathematical Syntax Tree) as expression language's syntax intermediate representation
- - [mst-building](src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt) : MST building algebraic structure
- - [mst-interpreter](src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt) : MST interpreter
+ - [expression-language](src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt) : Expression language and its parser
- [mst-jvm-codegen](src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt) : Dynamic MST to JVM bytecode compiler
- [mst-js-codegen](src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt) : Dynamic MST to JS compiler
+ - [rendering](src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt) : Extendable MST rendering
## Artifact:
-The Maven coordinates of this project are `space.kscience:kmath-ast:0.3.0-dev-4`.
+The Maven coordinates of this project are `space.kscience:kmath-ast:0.3.0-dev-7`.
**Gradle:**
```gradle
@@ -23,7 +21,7 @@ repositories {
}
dependencies {
- implementation 'space.kscience:kmath-ast:0.3.0-dev-4'
+ implementation 'space.kscience:kmath-ast:0.3.0-dev-7'
}
```
**Gradle Kotlin DSL:**
@@ -35,7 +33,7 @@ repositories {
}
dependencies {
- implementation("space.kscience:kmath-ast:0.3.0-dev-4")
+ implementation("space.kscience:kmath-ast:0.3.0-dev-7")
}
```
@@ -49,7 +47,7 @@ a special implementation of `Expression` with implemented `invoke` function.
For example, the following builder:
```kotlin
-DoubleField.mstInField { symbol("x") + 2 }.compile()
+MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField)
```
… leads to generation of bytecode, which can be decompiled to the following Java class:
@@ -77,15 +75,6 @@ public final class AsmCompiledExpression_45045_0 implements Expression {
```
-### Example Usage
-
-This API extends MST and MstExpression, so you may optimize as both of them:
-
-```kotlin
-DoubleField.mstInField { symbol("x") + 2 }.compile()
-DoubleField.expression("x+2".parseMath())
-```
-
#### Known issues
- The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid
@@ -97,7 +86,7 @@ DoubleField.expression("x+2".parseMath())
A similar feature is also available on JS.
```kotlin
-DoubleField.mstInField { symbol("x") + 2 }.compile()
+MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField)
```
The code above returns expression implemented with such a JS function:
@@ -108,13 +97,32 @@ var executable = function (constants, arguments) {
};
```
+
+```kotlin
+import space.kscience.kmath.wasm.*
+
+MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField)
+```
+
+An example of emitted WASM IR in the form of WAT:
+
+```lisp
+(func $executable (param $0 f64) (result f64)
+ (f64.add
+ (local.get $0)
+ (f64.const 2)
+ )
+)
+```
+
#### Known issues
-- This feature uses `eval` which can be unavailable in several environments.
+- ESTree expression compilation uses `eval` which can be unavailable in several environments.
+- WebAssembly isn't supported by old versions of browsers (see https://webassembly.org/roadmap/).
## Rendering expressions
-kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.
+kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.
Example usage:
@@ -135,7 +143,7 @@ public fun main() {
}
```
-Result LaTeX:
+Result LaTeX:
![](http://chart.googleapis.com/chart?cht=tx&chl=e%5E%7B%5Csqrt%7Bx%7D%7D-%5Cfrac%7B%5Cfrac%7B%5Coperatorname%7Bsin%7D%5E%7B-1%7D%5C,%5Cleft(2%5C,x%5Cright)%7D%7B2%5Ctimes10%5E%7B10%7D%2Bx%5E%7B3%7D%7D%7D%7B-12%7D)
@@ -145,5 +153,5 @@ Result MathML (embedding MathML is not allowed by GitHub Markdown):
ex-sin-12x2×1010+x3-12
```
-It is also possible to create custom algorithms of render, and even add support of other markup languages
+It is also possible to create custom algorithms of render, and even add support of other markup languages
(see API reference).
diff --git a/kmath-ast/build.gradle.kts b/kmath-ast/build.gradle.kts
index e3a7faf0a..b4a0b28ac 100644
--- a/kmath-ast/build.gradle.kts
+++ b/kmath-ast/build.gradle.kts
@@ -1,7 +1,6 @@
-import ru.mipt.npm.gradle.Maturity
-
plugins {
- id("ru.mipt.npm.gradle.mpp")
+ kotlin("multiplatform")
+ id("ru.mipt.npm.gradle.common")
}
kotlin.js {
@@ -21,6 +20,7 @@ kotlin.js {
kotlin.sourceSets {
commonMain {
dependencies {
+ api("com.github.h0tk3y.betterParse:better-parse:0.4.2")
api(project(":kmath-core"))
}
}
@@ -33,13 +33,15 @@ kotlin.sourceSets {
jsMain {
dependencies {
- implementation(npm("astring", "1.7.0"))
+ implementation(npm("astring", "1.7.4"))
+ implementation(npm("binaryen", "100.0"))
+ implementation(npm("js-base64", "3.6.0"))
+ implementation(npm("webassembly", "0.11.0"))
}
}
jvmMain {
dependencies {
- api("com.github.h0tk3y.betterParse:better-parse:0.4.1")
implementation("org.ow2.asm:asm:9.1")
implementation("org.ow2.asm:asm-commons:9.1")
}
@@ -52,31 +54,13 @@ tasks.dokkaHtml {
}
readme {
- maturity = Maturity.PROTOTYPE
+ maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
propertyByTemplate("artifact", rootProject.file("docs/templates/ARTIFACT-TEMPLATE.md"))
feature(
id = "expression-language",
description = "Expression language and its parser",
- ref = "src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt"
- )
-
- feature(
- id = "mst",
- description = "MST (Mathematical Syntax Tree) as expression language's syntax intermediate representation",
- ref = "src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt"
- )
-
- feature(
- id = "mst-building",
- description = "MST building algebraic structure",
- ref = "src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt"
- )
-
- feature(
- id = "mst-interpreter",
- description = "MST interpreter",
- ref = "src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt"
+ ref = "src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt"
)
feature(
@@ -90,4 +74,10 @@ readme {
description = "Dynamic MST to JS compiler",
ref = "src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt"
)
+
+ feature(
+ id = "rendering",
+ description = "Extendable MST rendering",
+ ref = "src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt"
+ )
}
diff --git a/kmath-ast/docs/README-TEMPLATE.md b/kmath-ast/docs/README-TEMPLATE.md
index 9ed44d584..b38311ea1 100644
--- a/kmath-ast/docs/README-TEMPLATE.md
+++ b/kmath-ast/docs/README-TEMPLATE.md
@@ -16,7 +16,7 @@ a special implementation of `Expression` with implemented `invoke` function.
For example, the following builder:
```kotlin
-DoubleField.mstInField { symbol("x") + 2 }.compile()
+MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField)
```
… leads to generation of bytecode, which can be decompiled to the following Java class:
@@ -44,15 +44,6 @@ public final class AsmCompiledExpression_45045_0 implements Expression {
```
-### Example Usage
-
-This API extends MST and MstExpression, so you may optimize as both of them:
-
-```kotlin
-DoubleField.mstInField { symbol("x") + 2 }.compile()
-DoubleField.expression("x+2".parseMath())
-```
-
#### Known issues
- The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid
@@ -64,7 +55,7 @@ DoubleField.expression("x+2".parseMath())
A similar feature is also available on JS.
```kotlin
-DoubleField.mstInField { symbol("x") + 2 }.compile()
+MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField)
```
The code above returns expression implemented with such a JS function:
@@ -75,13 +66,32 @@ var executable = function (constants, arguments) {
};
```
+
+```kotlin
+import space.kscience.kmath.wasm.*
+
+MstField { bindSymbol("x") + 2 }.compileToExpression(DoubleField)
+```
+
+An example of emitted WASM IR in the form of WAT:
+
+```lisp
+(func \$executable (param \$0 f64) (result f64)
+ (f64.add
+ (local.get \$0)
+ (f64.const 2)
+ )
+)
+```
+
#### Known issues
-- This feature uses `eval` which can be unavailable in several environments.
+- ESTree expression compilation uses `eval` which can be unavailable in several environments.
+- WebAssembly isn't supported by old versions of browsers (see https://webassembly.org/roadmap/).
## Rendering expressions
-kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.
+kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.
Example usage:
@@ -102,7 +112,7 @@ public fun main() {
}
```
-Result LaTeX:
+Result LaTeX:
![](http://chart.googleapis.com/chart?cht=tx&chl=e%5E%7B%5Csqrt%7Bx%7D%7D-%5Cfrac%7B%5Cfrac%7B%5Coperatorname%7Bsin%7D%5E%7B-1%7D%5C,%5Cleft(2%5C,x%5Cright)%7D%7B2%5Ctimes10%5E%7B10%7D%2Bx%5E%7B3%7D%7D%7D%7B-12%7D)
@@ -112,5 +122,5 @@ Result MathML (embedding MathML is not allowed by GitHub Markdown):
ex-sin-12x2×1010+x3-12
```
-It is also possible to create custom algorithms of render, and even add support of other markup languages
+It is also possible to create custom algorithms of render, and even add support of other markup languages
(see API reference).
diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt
similarity index 95%
rename from kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt
rename to kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt
index 8ecb0adda..d2e92c37f 100644
--- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt
@@ -1,4 +1,7 @@
-// TODO move to common when https://github.com/h0tk3y/better-parse/pull/37 is merged
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
package space.kscience.kmath.ast
@@ -13,6 +16,7 @@ import com.github.h0tk3y.betterParse.lexer.literalToken
import com.github.h0tk3y.betterParse.lexer.regexToken
import com.github.h0tk3y.betterParse.parser.ParseResult
import com.github.h0tk3y.betterParse.parser.Parser
+import space.kscience.kmath.expressions.MST
import space.kscience.kmath.operations.FieldOperations
import space.kscience.kmath.operations.GroupOperations
import space.kscience.kmath.operations.PowerOperations
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/LatexSyntaxRenderer.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/LatexSyntaxRenderer.kt
index 5d40097b6..1c82bd6e7 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/LatexSyntaxRenderer.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/LatexSyntaxRenderer.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
/**
@@ -66,6 +71,15 @@ public object LatexSyntaxRenderer : SyntaxRenderer {
append('}')
}
+ is ExponentSyntax -> if (node.useOperatorForm) {
+ append("\\operatorname{exp}\\,")
+ render(node.operand)
+ } else {
+ append("e^{")
+ render(node.operand)
+ append('}')
+ }
+
is SuperscriptSyntax -> {
render(node.left)
append("^{")
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathMLSyntaxRenderer.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathMLSyntaxRenderer.kt
index d1d3c82e3..decd4ba46 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathMLSyntaxRenderer.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathMLSyntaxRenderer.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
/**
@@ -77,6 +82,19 @@ public object MathMLSyntaxRenderer : SyntaxRenderer {
is RadicalSyntax -> tag("msqrt") { render(node.operand) }
+ is ExponentSyntax -> if (node.useOperatorForm) {
+ tag("mo") { append("exp") }
+ tag("mspace", "width" to "0.167em")
+ render(node.operand)
+ } else {
+ tag("msup") {
+ tag("mrow") {
+ tag("mi") { append("e") }
+ }
+ tag("mrow") { render(node.operand) }
+ }
+ }
+
is SuperscriptSyntax -> tag("msup") {
tag("mrow") { render(node.left) }
tag("mrow") { render(node.right) }
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt
index 14e14404c..9df2c54dd 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt
@@ -1,6 +1,11 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
-import space.kscience.kmath.ast.MST
+import space.kscience.kmath.expressions.MST
/**
* Renders [MST] to [MathSyntax].
@@ -78,7 +83,7 @@ public open class FeaturedMathRendererWithPostProcess(
Fraction.Default,
Power.Default,
SquareRoot.Default,
- Exponential.Default,
+ Exponent.Default,
InverseTrigonometricOperations.Default,
// Fallback option for unknown operations - printing them as operator
@@ -95,6 +100,7 @@ public open class FeaturedMathRendererWithPostProcess(
PrintSymbolic,
),
listOf(
+ BetterExponent,
SimplifyParentheses.Default,
BetterMultiplication,
),
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathSyntax.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathSyntax.kt
index febb6e5af..6a46bf535 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathSyntax.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathSyntax.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
/**
@@ -184,6 +189,24 @@ public data class RadicalSyntax(
}
}
+/**
+ * Represents exponential function.
+ *
+ * @property operand The argument of function.
+ * @property useOperatorForm `true` if operator form is used (*exp (x)*), `false` if exponentiation form is used
+ * (*ex*).
+ * @author Iaroslav Postovalov
+ */
+public data class ExponentSyntax(
+ public override val operation: String,
+ public override val operand: OperandSyntax,
+ public var useOperatorForm: Boolean,
+) : UnarySyntax() {
+ init {
+ operand.parent = this
+ }
+}
+
/**
* Represents a syntax node with superscript (usually, for exponentiation).
*
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/SyntaxRenderer.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/SyntaxRenderer.kt
index fcc79f76b..7fa91e158 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/SyntaxRenderer.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/SyntaxRenderer.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
/**
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/features.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/features.kt
index 95108ba45..c09282bb6 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/features.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/features.kt
@@ -1,7 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
-import space.kscience.kmath.ast.MST
import space.kscience.kmath.ast.rendering.FeaturedMathRenderer.RenderFeature
+import space.kscience.kmath.expressions.MST
import space.kscience.kmath.operations.*
import kotlin.reflect.KClass
@@ -51,10 +56,14 @@ private fun printSignedNumberString(s: String): MathSyntax {
public class PrettyPrintFloats(public val types: Set>) : RenderFeature {
public override fun render(renderer: FeaturedMathRenderer, node: MST): MathSyntax? {
if (node !is MST.Numeric || node.value::class !in types) return null
- val toString = node.value.toString().removeSuffix(".0")
+ val toString = when (val v = node.value) {
+ is Float -> v.multiplatformToString()
+ is Double -> v.multiplatformToString()
+ else -> v.toString()
+ }.removeSuffix(".0")
- if ('E' in toString) {
- val (beforeE, afterE) = toString.split('E')
+ if (toString.contains('E', ignoreCase = true)) {
+ val (beforeE, afterE) = toString.split('E', ignoreCase = true)
val significand = beforeE.toDouble().toString().removeSuffix(".0")
val exponent = afterE.toDouble().toString().removeSuffix(".0")
@@ -103,9 +112,7 @@ public class PrettyPrintFloats(public val types: Set>) : Rend
*/
public class PrettyPrintIntegers(public val types: Set>) : RenderFeature {
public override fun render(renderer: FeaturedMathRenderer, node: MST): MathSyntax? {
- if (node !is MST.Numeric || node.value::class !in types)
- return null
-
+ if (node !is MST.Numeric || node.value::class !in types) return null
return printSignedNumberString(node.value.toString())
}
@@ -277,15 +284,15 @@ public class SquareRoot(operations: Collection?) : Unary(operations) {
}
}
-public class Exponential(operations: Collection?) : Unary(operations) {
- public override fun render0(parent: FeaturedMathRenderer, node: MST.Unary): MathSyntax = SuperscriptSyntax(
+public class Exponent(operations: Collection?) : Unary(operations) {
+ public override fun render0(parent: FeaturedMathRenderer, node: MST.Unary): MathSyntax = ExponentSyntax(
operation = node.operation,
- left = SymbolSyntax(string = "e"),
- right = parent.render(node.value),
+ operand = OperandSyntax(operand = parent.render(node.value), parentheses = true),
+ useOperatorForm = true,
)
public companion object {
- public val Default: Exponential = Exponential(setOf(ExponentialOperations.EXP_OPERATION))
+ public val Default: Exponent = Exponent(setOf(ExponentialOperations.EXP_OPERATION))
}
}
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt
new file mode 100644
index 000000000..291399cee
--- /dev/null
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt
@@ -0,0 +1,9 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.ast.rendering
+
+internal expect fun Double.multiplatformToString(): String
+internal expect fun Float.multiplatformToString(): String
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/stages.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/stages.kt
index c183f6ace..a08f089f1 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/stages.kt
+++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/stages.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
import space.kscience.kmath.operations.FieldOperations
@@ -11,69 +16,110 @@ import space.kscience.kmath.operations.RingOperations
* @author Iaroslav Postovalov
*/
public object BetterMultiplication : FeaturedMathRendererWithPostProcess.PostProcessStage {
- public override fun perform(node: MathSyntax) {
- when (node) {
- is NumberSyntax -> Unit
- is SymbolSyntax -> Unit
- is OperatorNameSyntax -> Unit
- is SpecialSymbolSyntax -> Unit
- is OperandSyntax -> perform(node.operand)
+ public override fun perform(node: MathSyntax): Unit = when (node) {
+ is NumberSyntax -> Unit
+ is SymbolSyntax -> Unit
+ is OperatorNameSyntax -> Unit
+ is SpecialSymbolSyntax -> Unit
+ is OperandSyntax -> perform(node.operand)
- is UnaryOperatorSyntax -> {
- perform(node.prefix)
- perform(node.operand)
- }
-
- is UnaryPlusSyntax -> perform(node.operand)
- is UnaryMinusSyntax -> perform(node.operand)
- is RadicalSyntax -> perform(node.operand)
-
- is SuperscriptSyntax -> {
- perform(node.left)
- perform(node.right)
- }
-
- is SubscriptSyntax -> {
- perform(node.left)
- perform(node.right)
- }
-
- is BinaryOperatorSyntax -> {
- perform(node.prefix)
- perform(node.left)
- perform(node.right)
- }
-
- is BinaryPlusSyntax -> {
- perform(node.left)
- perform(node.right)
- }
-
- is BinaryMinusSyntax -> {
- perform(node.left)
- perform(node.right)
- }
-
- is FractionSyntax -> {
- perform(node.left)
- perform(node.right)
- }
-
- is RadicalWithIndexSyntax -> {
- perform(node.left)
- perform(node.right)
- }
-
- is MultiplicationSyntax -> {
- node.times = node.right.operand is NumberSyntax && !node.right.parentheses
- || node.left.operand is NumberSyntax && node.right.operand is FractionSyntax
- || node.left.operand is NumberSyntax && node.right.operand is NumberSyntax
- || node.left.operand is NumberSyntax && node.right.operand is SuperscriptSyntax && node.right.operand.left is NumberSyntax
-
- perform(node.left)
- perform(node.right)
- }
+ is UnaryOperatorSyntax -> {
+ perform(node.prefix)
+ perform(node.operand)
}
+
+ is UnaryPlusSyntax -> perform(node.operand)
+ is UnaryMinusSyntax -> perform(node.operand)
+ is RadicalSyntax -> perform(node.operand)
+ is ExponentSyntax -> perform(node.operand)
+
+ is SuperscriptSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is SubscriptSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is BinaryOperatorSyntax -> {
+ perform(node.prefix)
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is BinaryPlusSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is BinaryMinusSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is FractionSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is RadicalWithIndexSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is MultiplicationSyntax -> {
+ node.times = node.right.operand is NumberSyntax && !node.right.parentheses
+ || node.left.operand is NumberSyntax && node.right.operand is FractionSyntax
+ || node.left.operand is NumberSyntax && node.right.operand is NumberSyntax
+ || node.left.operand is NumberSyntax && node.right.operand is SuperscriptSyntax && node.right.operand.left is NumberSyntax
+
+ perform(node.left)
+ perform(node.right)
+ }
+ }
+}
+
+
+/**
+ * Applies [ExponentSyntax.useOperatorForm] to [ExponentSyntax] when the operand contains a fraction, a
+ * superscript or a subscript to improve readability.
+ *
+ * @author Iaroslav Postovalov
+ */
+public object BetterExponent : FeaturedMathRendererWithPostProcess.PostProcessStage {
+ private fun perform0(node: MathSyntax): Boolean {
+ return when (node) {
+ is NumberSyntax -> false
+ is SymbolSyntax -> false
+ is OperatorNameSyntax -> false
+ is SpecialSymbolSyntax -> false
+ is OperandSyntax -> perform0(node.operand)
+ is UnaryOperatorSyntax -> perform0(node.prefix) || perform0(node.operand)
+ is UnaryPlusSyntax -> perform0(node.operand)
+ is UnaryMinusSyntax -> perform0(node.operand)
+ is RadicalSyntax -> perform0(node.operand)
+
+ is ExponentSyntax -> {
+ val r = perform0(node.operand)
+ node.useOperatorForm = r
+ r
+ }
+
+ is SuperscriptSyntax -> true
+ is SubscriptSyntax -> true
+ is BinaryOperatorSyntax -> perform0(node.prefix) || perform0(node.left) || perform0(node.right)
+ is BinaryPlusSyntax -> perform0(node.left) || perform0(node.right)
+ is BinaryMinusSyntax -> perform0(node.left) || perform0(node.right)
+ is FractionSyntax -> true
+ is RadicalWithIndexSyntax -> perform0(node.left) || perform0(node.right)
+ is MultiplicationSyntax -> perform0(node.left) || perform0(node.right)
+ }
+ }
+
+ public override fun perform(node: MathSyntax) {
+ perform0(node)
}
}
@@ -85,89 +131,89 @@ public object BetterMultiplication : FeaturedMathRendererWithPostProcess.PostPro
*/
public class SimplifyParentheses(public val precedenceFunction: (MathSyntax) -> Int) :
FeaturedMathRendererWithPostProcess.PostProcessStage {
- public override fun perform(node: MathSyntax) {
- when (node) {
- is NumberSyntax -> Unit
- is SymbolSyntax -> Unit
- is OperatorNameSyntax -> Unit
- is SpecialSymbolSyntax -> Unit
+ public override fun perform(node: MathSyntax): Unit = when (node) {
+ is NumberSyntax -> Unit
+ is SymbolSyntax -> Unit
+ is OperatorNameSyntax -> Unit
+ is SpecialSymbolSyntax -> Unit
- is OperandSyntax -> {
- val isRightOfSuperscript =
- (node.parent is SuperscriptSyntax) && (node.parent as SuperscriptSyntax).right === node
+ is OperandSyntax -> {
+ val isRightOfSuperscript =
+ (node.parent is SuperscriptSyntax) && (node.parent as SuperscriptSyntax).right === node
- val precedence = precedenceFunction(node.operand)
+ val precedence = precedenceFunction(node.operand)
- val needParenthesesByPrecedence = when (val parent = node.parent) {
- null -> false
+ val needParenthesesByPrecedence = when (val parent = node.parent) {
+ null -> false
- is BinarySyntax -> {
- val parentPrecedence = precedenceFunction(parent)
+ is BinarySyntax -> {
+ val parentPrecedence = precedenceFunction(parent)
- parentPrecedence < precedence ||
- parentPrecedence == precedence && parentPrecedence != 0 && node === parent.right
- }
-
- else -> precedence > precedenceFunction(parent)
+ parentPrecedence < precedence ||
+ parentPrecedence == precedence && parentPrecedence != 0 && node === parent.right
}
- node.parentheses = !isRightOfSuperscript
- && (needParenthesesByPrecedence || node.parent is UnaryOperatorSyntax)
-
- perform(node.operand)
+ else -> precedence > precedenceFunction(parent)
}
- is UnaryOperatorSyntax -> {
- perform(node.prefix)
- perform(node.operand)
- }
+ val isInsideExpOperator =
+ node.parent is ExponentSyntax && (node.parent as ExponentSyntax).useOperatorForm
- is UnaryPlusSyntax -> perform(node.operand)
- is UnaryMinusSyntax -> {
- perform(node.operand)
- }
- is RadicalSyntax -> perform(node.operand)
+ node.parentheses = !isRightOfSuperscript
+ && (needParenthesesByPrecedence || node.parent is UnaryOperatorSyntax || isInsideExpOperator)
- is SuperscriptSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ perform(node.operand)
+ }
- is SubscriptSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ is UnaryOperatorSyntax -> {
+ perform(node.prefix)
+ perform(node.operand)
+ }
- is BinaryOperatorSyntax -> {
- perform(node.prefix)
- perform(node.left)
- perform(node.right)
- }
+ is UnaryPlusSyntax -> perform(node.operand)
+ is UnaryMinusSyntax -> perform(node.operand)
+ is RadicalSyntax -> perform(node.operand)
+ is ExponentSyntax -> perform(node.operand)
- is BinaryPlusSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ is SuperscriptSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
- is BinaryMinusSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ is SubscriptSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
- is FractionSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ is BinaryOperatorSyntax -> {
+ perform(node.prefix)
+ perform(node.left)
+ perform(node.right)
+ }
- is MultiplicationSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ is BinaryPlusSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
- is RadicalWithIndexSyntax -> {
- perform(node.left)
- perform(node.right)
- }
+ is BinaryMinusSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is FractionSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is MultiplicationSyntax -> {
+ perform(node.left)
+ perform(node.right)
+ }
+
+ is RadicalWithIndexSyntax -> {
+ perform(node.left)
+ perform(node.right)
}
}
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/ParserPrecedenceTest.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/ParserPrecedenceTest.kt
similarity index 72%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/ParserPrecedenceTest.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/ParserPrecedenceTest.kt
index 1450cab84..ca3a95bc8 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/ParserPrecedenceTest.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/ParserPrecedenceTest.kt
@@ -1,13 +1,17 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast
+import space.kscience.kmath.ast.parseMath
+import space.kscience.kmath.expressions.evaluate
import space.kscience.kmath.operations.DoubleField
-import space.kscience.kmath.operations.Field
import kotlin.test.Test
import kotlin.test.assertEquals
internal class ParserPrecedenceTest {
- private val f: Field = DoubleField
-
@Test
fun test1(): Unit = assertEquals(6.0, f.evaluate("2*2+2".parseMath()))
@@ -31,4 +35,8 @@ internal class ParserPrecedenceTest {
@Test
fun test8(): Unit = assertEquals(18.0, f.evaluate("2*2^3+2".parseMath()))
+
+ private companion object {
+ private val f = DoubleField
+ }
}
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/ParserTest.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/ParserTest.kt
similarity index 77%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/ParserTest.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/ParserTest.kt
index 2b83e566e..185659a1f 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/ParserTest.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/ParserTest.kt
@@ -1,29 +1,28 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast
import space.kscience.kmath.complex.Complex
import space.kscience.kmath.complex.ComplexField
+import space.kscience.kmath.expressions.evaluate
import space.kscience.kmath.operations.Algebra
import space.kscience.kmath.operations.DoubleField
-import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
internal class ParserTest {
@Test
- fun `evaluate MST`() {
+ fun evaluateParsedMst() {
val mst = "2+2*(2+2)".parseMath()
val res = ComplexField.evaluate(mst)
assertEquals(Complex(10.0, 0.0), res)
}
@Test
- fun `evaluate MSTExpression`() {
- val res = MstField.invoke { number(2) + number(2) * (number(2) + number(2)) }.interpret(ComplexField)
- assertEquals(Complex(10.0, 0.0), res)
- }
-
- @Test
- fun `evaluate MST with singular`() {
+ fun evaluateMstSymbol() {
val mst = "i".parseMath()
val res = ComplexField.evaluate(mst)
assertEquals(ComplexField.i, res)
@@ -31,14 +30,14 @@ internal class ParserTest {
@Test
- fun `evaluate MST with unary function`() {
+ fun evaluateMstUnary() {
val mst = "sin(0)".parseMath()
val res = DoubleField.evaluate(mst)
assertEquals(0.0, res)
}
@Test
- fun `evaluate MST with binary function`() {
+ fun evaluateMstBinary() {
val magicalAlgebra = object : Algebra {
override fun bindSymbolOrNull(value: String): String = value
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt
similarity index 75%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt
index 5850ea23d..1ab20ed85 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt
@@ -1,7 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
-import space.kscience.kmath.ast.MST.Numeric
import space.kscience.kmath.ast.rendering.TestUtils.testLatex
+import space.kscience.kmath.expressions.MST.Numeric
import kotlin.test.Test
internal class TestFeatures {
@@ -37,6 +42,22 @@ internal class TestFeatures {
testLatex(Numeric(1.1e-10), "1.1\\times10^{-10}")
testLatex(Numeric(-1.1e-10), "-1.1\\times10^{-10}")
testLatex(Numeric(-1.1e10), "-1.1\\times10^{10}")
+ testLatex(Numeric(0.001), "0.001")
+ testLatex(Numeric(0.0000001), "1\\times10^{-7}")
+
+ testLatex(Numeric(Float.NaN), "NaN")
+ testLatex(Numeric(Float.POSITIVE_INFINITY), "\\infty")
+ testLatex(Numeric(Float.NEGATIVE_INFINITY), "-\\infty")
+ testLatex(Numeric(1.0f), "1")
+ testLatex(Numeric(-1.0f), "-1")
+ testLatex(Numeric(1.42f), "1.42")
+ testLatex(Numeric(-1.42f), "-1.42")
+ testLatex(Numeric(1e10f), "1\\times10^{10}")
+ testLatex(Numeric(1e-10f), "1\\times10^{-10}")
+ testLatex(Numeric(-1e-10f), "-1\\times10^{-10}")
+ testLatex(Numeric(-1e10f), "-1\\times10^{10}")
+ testLatex(Numeric(0.001f), "0.001")
+ testLatex(Numeric(0.0000001f), "1\\times10^{-7}")
}
@Test
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestLatex.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestLatex.kt
similarity index 89%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestLatex.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestLatex.kt
index 599bee436..6322df25d 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestLatex.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestLatex.kt
@@ -1,7 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
-import space.kscience.kmath.ast.MST
import space.kscience.kmath.ast.rendering.TestUtils.testLatex
+import space.kscience.kmath.expressions.MST
import space.kscience.kmath.operations.GroupOperations
import kotlin.test.Test
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestMathML.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestMathML.kt
similarity index 92%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestMathML.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestMathML.kt
index 6fadef6cd..2d7bfad19 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestMathML.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestMathML.kt
@@ -1,7 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
-import space.kscience.kmath.ast.MST
import space.kscience.kmath.ast.rendering.TestUtils.testMathML
+import space.kscience.kmath.expressions.MST
import space.kscience.kmath.operations.GroupOperations
import kotlin.test.Test
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestStages.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestStages.kt
similarity index 68%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestStages.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestStages.kt
index 56a799c2c..599e43eb2 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestStages.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestStages.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
import space.kscience.kmath.ast.rendering.TestUtils.testLatex
@@ -25,4 +30,11 @@ internal class TestStages {
testLatex("(x+x)^x+x*x", "\\left(x+x\\right)^{x}+x\\,x")
testLatex("x^(x+x)", "x^{x+x}")
}
+
+ @Test
+ fun exponent() {
+ testLatex("exp(x)", "e^{x}")
+ testLatex("exp(x/2)", "\\operatorname{exp}\\,\\left(\\frac{x}{2}\\right)")
+ testLatex("exp(x^2)", "\\operatorname{exp}\\,\\left(x^{2}\\right)")
+ }
}
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestUtils.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestUtils.kt
similarity index 89%
rename from kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestUtils.kt
rename to kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestUtils.kt
index e6359bcc9..7c9400532 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/ast/rendering/TestUtils.kt
+++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestUtils.kt
@@ -1,7 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.ast.rendering
-import space.kscience.kmath.ast.MST
import space.kscience.kmath.ast.parseMath
+import space.kscience.kmath.expressions.MST
import kotlin.test.assertEquals
internal object TestUtils {
diff --git a/kmath-ast/src/commonTest/kotlin/space/kscisnce/kmath/ast/InterpretTest.kt b/kmath-ast/src/commonTest/kotlin/space/kscisnce/kmath/ast/InterpretTest.kt
deleted file mode 100644
index 1b8ec1490..000000000
--- a/kmath-ast/src/commonTest/kotlin/space/kscisnce/kmath/ast/InterpretTest.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package space.kscisnce.kmath.ast
-
-import space.kscience.kmath.ast.MstField
-import space.kscience.kmath.ast.toExpression
-import space.kscience.kmath.expressions.invoke
-import space.kscience.kmath.misc.Symbol.Companion.x
-import space.kscience.kmath.operations.DoubleField
-import space.kscience.kmath.operations.bindSymbol
-import space.kscience.kmath.operations.invoke
-import kotlin.test.Test
-
-class InterpretTest {
-
- @Test
- fun interpretation(){
- val expr = MstField {
- val x = bindSymbol(x)
- x * 2.0 + number(2.0) / x - 16.0
- }.toExpression(DoubleField)
- expr(x to 2.2)
- }
-}
\ No newline at end of file
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt
new file mode 100644
index 000000000..521907d2c
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.ast.rendering
+
+internal actual fun Double.multiplatformToString(): String {
+ val d = this
+ if (d >= 1e7 || d <= -1e7) return js("d.toExponential()") as String
+ return toString()
+}
+
+internal actual fun Float.multiplatformToString(): String {
+ val d = this
+ if (d >= 1e7f || d <= -1e7f) return js("d.toExponential()") as String
+ return toString()
+}
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt
index 796ffce1e..40468f5ab 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt
@@ -1,11 +1,16 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree
-import space.kscience.kmath.ast.MST
-import space.kscience.kmath.ast.MST.*
import space.kscience.kmath.estree.internal.ESTreeBuilder
-import space.kscience.kmath.estree.internal.estree.BaseExpression
import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.expressions.MST
+import space.kscience.kmath.expressions.MST.*
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.internal.estree.BaseExpression
import space.kscience.kmath.misc.Symbol
import space.kscience.kmath.operations.Algebra
import space.kscience.kmath.operations.NumericAlgebra
@@ -26,16 +31,17 @@ internal fun MST.compileWith(algebra: Algebra): Expression {
is Unary -> when {
algebra is NumericAlgebra && node.value is Numeric -> constant(
- algebra.unaryOperationFunction(node.operation)(algebra.number(node.value.value)))
+ algebra.unaryOperationFunction(node.operation)(algebra.number((node.value as Numeric).value)))
else -> call(algebra.unaryOperationFunction(node.operation), visit(node.value))
}
is Binary -> when {
algebra is NumericAlgebra && node.left is Numeric && node.right is Numeric -> constant(
- algebra
- .binaryOperationFunction(node.operation)
- .invoke(algebra.number(node.left.value), algebra.number(node.right.value))
+ algebra.binaryOperationFunction(node.operation).invoke(
+ algebra.number((node.left as Numeric).value),
+ algebra.number((node.right as Numeric).value)
+ )
)
algebra is NumericAlgebra && node.left is Numeric -> call(
@@ -70,12 +76,12 @@ public fun MST.compileToExpression(algebra: Algebra): Expression
/**
* Compile given MST to expression and evaluate it against [arguments]
*/
-public inline fun MST.compile(algebra: Algebra, arguments: Map): T =
+public inline fun MST.compile(algebra: Algebra, arguments: Map): T =
compileToExpression(algebra).invoke(arguments)
/**
* Compile given MST to expression and evaluate it against [arguments]
*/
-public inline fun MST.compile(algebra: Algebra, vararg arguments: Pair): T =
+public inline fun MST.compile(algebra: Algebra, vararg arguments: Pair): T =
compileToExpression(algebra).invoke(*arguments)
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/ESTreeBuilder.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/ESTreeBuilder.kt
index 1e966d986..ac20484a4 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/ESTreeBuilder.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/ESTreeBuilder.kt
@@ -1,8 +1,18 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree.internal
-import space.kscience.kmath.estree.internal.astring.generate
-import space.kscience.kmath.estree.internal.estree.*
import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.internal.astring.generate
+import space.kscience.kmath.internal.estree.*
+import space.kscience.kmath.internal.estree.BaseExpression
+import space.kscience.kmath.internal.estree.BlockStatement
+import space.kscience.kmath.internal.estree.Program
+import space.kscience.kmath.internal.estree.VariableDeclaration
+import space.kscience.kmath.internal.estree.VariableDeclarator
import space.kscience.kmath.misc.Symbol
internal class ESTreeBuilder(val bodyCallback: ESTreeBuilder.() -> BaseExpression) {
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.typealises.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.typealises.kt
index 9e75a97c7..eb5c1e3dd 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.typealises.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.typealises.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree.internal.astring
internal typealias Generator = Any
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/stream/stream.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/stream/stream.kt
deleted file mode 100644
index c3477c482..000000000
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/stream/stream.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package space.kscience.kmath.estree.internal.stream
-
-import space.kscience.kmath.estree.internal.emitter.Emitter
-
-internal open external class Stream : Emitter {
- open fun pipe(dest: Any, options: Any): Any
-}
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/astring/astring.kt
similarity index 77%
rename from kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.kt
rename to kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/astring/astring.kt
index 1b7500ddb..cca2d83af 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/astring/astring.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/astring/astring.kt
@@ -1,9 +1,14 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
@file:JsModule("astring")
@file:JsNonModule
-package space.kscience.kmath.estree.internal.astring
+package space.kscience.kmath.internal.astring
-import space.kscience.kmath.estree.internal.estree.BaseNode
+import space.kscience.kmath.internal.estree.BaseNode
internal external interface Options {
var indent: String?
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/astring/astring.typealises.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/astring/astring.typealises.kt
new file mode 100644
index 000000000..93b4f6ce6
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/astring/astring.typealises.kt
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.internal.astring
+
+internal typealias Generator = Any
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/base64/base64.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/base64/base64.kt
new file mode 100644
index 000000000..86e0cede7
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/base64/base64.kt
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+@file:Suppress(
+ "INTERFACE_WITH_SUPERCLASS",
+ "OVERRIDING_FINAL_MEMBER",
+ "RETURN_TYPE_MISMATCH_ON_OVERRIDE",
+ "CONFLICTING_OVERLOADS",
+ "NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING",
+ "ObjectPropertyName",
+ "ClassName",
+)
+@file:JsNonModule
+@file:JsModule("js-base64")
+
+package space.kscience.kmath.internal.base64
+
+import org.khronos.webgl.Uint8Array
+
+internal external var version: Any
+
+internal external var VERSION: Any
+
+internal external var btoaPolyfill: (bin: String) -> String
+
+internal external var _btoa: (bin: String) -> String
+
+internal external var fromUint8Array: (u8a: Uint8Array, urlsafe: Boolean) -> String
+
+internal external var utob: (u: String) -> String
+
+internal external var encode: (src: String, urlsafe: Boolean) -> String
+
+internal external var encodeURI: (src: String) -> String
+
+internal external var btou: (b: String) -> String
+
+internal external var atobPolyfill: (asc: String) -> String
+
+internal external var _atob: (asc: String) -> String
+
+internal external var toUint8Array: (a: String) -> Uint8Array
+
+internal external var decode: (src: String) -> String
+
+internal external var isValid: (src: Any) -> Boolean
+
+internal external var extendString: () -> Unit
+
+internal external var extendUint8Array: () -> Unit
+
+internal external var extendBuiltins: () -> Unit
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt
new file mode 100644
index 000000000..42b6ac7d8
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt
@@ -0,0 +1,2239 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+@file:Suppress(
+ "INTERFACE_WITH_SUPERCLASS",
+ "OVERRIDING_FINAL_MEMBER",
+ "RETURN_TYPE_MISMATCH_ON_OVERRIDE",
+ "CONFLICTING_OVERLOADS",
+ "NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING",
+ "PropertyName",
+ "ClassName",
+)
+
+@file:JsModule("binaryen")
+@file:JsNonModule
+
+package space.kscience.kmath.internal.binaryen
+
+import org.khronos.webgl.Uint8Array
+import kotlin.js.Promise
+
+internal external var isReady: Boolean
+
+internal external var ready: Promise
+
+internal external var none: Type
+
+internal external var i32: Type
+
+internal external var i64: Type
+
+internal external var f32: Type
+
+internal external var f64: Type
+
+internal external var v128: Type
+
+internal external var funcref: Type
+
+internal external var anyref: Type
+
+internal external var nullref: Type
+
+internal external var exnref: Type
+
+internal external var unreachable: Type
+
+internal external var auto: Type
+
+internal external fun createType(types: Array): Type
+
+internal external fun expandType(type: Type): Array
+
+internal external enum class ExpressionIds {
+ Invalid,
+ Block,
+ If,
+ Loop,
+ Break,
+ Switch,
+ Call,
+ CallIndirect,
+ LocalGet,
+ LocalSet,
+ GlobalGet,
+ GlobalSet,
+ Load,
+ Store,
+ Const,
+ Unary,
+ Binary,
+ Select,
+ Drop,
+ Return,
+ Host,
+ Nop,
+ Unreachable,
+ AtomicCmpxchg,
+ AtomicRMW,
+ AtomicWait,
+ AtomicNotify,
+ AtomicFence,
+ SIMDExtract,
+ SIMDReplace,
+ SIMDShuffle,
+ SIMDTernary,
+ SIMDShift,
+ SIMDLoad,
+ MemoryInit,
+ DataDrop,
+ MemoryCopy,
+ MemoryFill,
+ RefNull,
+ RefIsNull,
+ RefFunc,
+ Try,
+ Throw,
+ Rethrow,
+ BrOnExn,
+ TupleMake,
+ TupleExtract,
+ Push,
+ Pop
+}
+
+internal external var InvalidId: ExpressionIds
+
+internal external var BlockId: ExpressionIds
+
+internal external var IfId: ExpressionIds
+
+internal external var LoopId: ExpressionIds
+
+internal external var BreakId: ExpressionIds
+
+internal external var SwitchId: ExpressionIds
+
+internal external var CallId: ExpressionIds
+
+internal external var CallIndirectId: ExpressionIds
+
+internal external var LocalGetId: ExpressionIds
+
+internal external var LocalSetId: ExpressionIds
+
+internal external var GlobalGetId: ExpressionIds
+
+internal external var GlobalSetId: ExpressionIds
+
+internal external var LoadId: ExpressionIds
+
+internal external var StoreId: ExpressionIds
+
+internal external var ConstId: ExpressionIds
+
+internal external var UnaryId: ExpressionIds
+
+internal external var BinaryId: ExpressionIds
+
+internal external var SelectId: ExpressionIds
+
+internal external var DropId: ExpressionIds
+
+internal external var ReturnId: ExpressionIds
+
+internal external var HostId: ExpressionIds
+
+internal external var NopId: ExpressionIds
+
+internal external var UnreachableId: ExpressionIds
+
+internal external var AtomicCmpxchgId: ExpressionIds
+
+internal external var AtomicRMWId: ExpressionIds
+
+internal external var AtomicWaitId: ExpressionIds
+
+internal external var AtomicNotifyId: ExpressionIds
+
+internal external var AtomicFenceId: ExpressionIds
+
+internal external var SIMDExtractId: ExpressionIds
+
+internal external var SIMDReplaceId: ExpressionIds
+
+internal external var SIMDShuffleId: ExpressionIds
+
+internal external var SIMDTernaryId: ExpressionIds
+
+internal external var SIMDShiftId: ExpressionIds
+
+internal external var SIMDLoadId: ExpressionIds
+
+internal external var MemoryInitId: ExpressionIds
+
+internal external var DataDropId: ExpressionIds
+
+internal external var MemoryCopyId: ExpressionIds
+
+internal external var MemoryFillId: ExpressionIds
+
+internal external var RefNullId: ExpressionIds
+
+internal external var RefIsNullId: ExpressionIds
+
+internal external var RefFuncId: ExpressionIds
+
+internal external var TryId: ExpressionIds
+
+internal external var ThrowId: ExpressionIds
+
+internal external var RethrowId: ExpressionIds
+
+internal external var BrOnExnId: ExpressionIds
+
+internal external var TupleMakeId: ExpressionIds
+
+internal external var TupleExtractId: ExpressionIds
+
+internal external var PushId: ExpressionIds
+
+internal external var PopId: ExpressionIds
+
+internal external enum class ExternalKinds {
+ Function,
+ Table,
+ Memory,
+ Global,
+ Event
+}
+
+internal external var ExternalFunction: ExternalKinds
+
+internal external var ExternalTable: ExternalKinds
+
+internal external var ExternalMemory: ExternalKinds
+
+internal external var ExternalGlobal: ExternalKinds
+
+internal external var ExternalEvent: ExternalKinds
+
+internal external enum class Features {
+ MVP,
+ Atomics,
+ MutableGlobals,
+ TruncSat,
+ SIMD,
+ BulkMemory,
+ SignExt,
+ ExceptionHandling,
+ TailCall,
+ ReferenceTypes,
+ Multivalue,
+ GC,
+ Memory64,
+ All
+}
+
+internal external enum class Operations {
+ ClzInt32,
+ CtzInt32,
+ PopcntInt32,
+ NegFloat32,
+ AbsFloat32,
+ CeilFloat32,
+ FloorFloat32,
+ TruncFloat32,
+ NearestFloat32,
+ SqrtFloat32,
+ EqZInt32,
+ ClzInt64,
+ CtzInt64,
+ PopcntInt64,
+ NegFloat64,
+ AbsFloat64,
+ CeilFloat64,
+ FloorFloat64,
+ TruncFloat64,
+ NearestFloat64,
+ SqrtFloat64,
+ EqZInt64,
+ ExtendSInt32,
+ ExtendUInt32,
+ WrapInt64,
+ TruncSFloat32ToInt32,
+ TruncSFloat32ToInt64,
+ TruncUFloat32ToInt32,
+ TruncUFloat32ToInt64,
+ TruncSFloat64ToInt32,
+ TruncSFloat64ToInt64,
+ TruncUFloat64ToInt32,
+ TruncUFloat64ToInt64,
+ TruncSatSFloat32ToInt32,
+ TruncSatSFloat32ToInt64,
+ TruncSatUFloat32ToInt32,
+ TruncSatUFloat32ToInt64,
+ TruncSatSFloat64ToInt32,
+ TruncSatSFloat64ToInt64,
+ TruncSatUFloat64ToInt32,
+ TruncSatUFloat64ToInt64,
+ ReinterpretFloat32,
+ ReinterpretFloat64,
+ ConvertSInt32ToFloat32,
+ ConvertSInt32ToFloat64,
+ ConvertUInt32ToFloat32,
+ ConvertUInt32ToFloat64,
+ ConvertSInt64ToFloat32,
+ ConvertSInt64ToFloat64,
+ ConvertUInt64ToFloat32,
+ ConvertUInt64ToFloat64,
+ PromoteFloat32,
+ DemoteFloat64,
+ ReinterpretInt32,
+ ReinterpretInt64,
+ ExtendS8Int32,
+ ExtendS16Int32,
+ ExtendS8Int64,
+ ExtendS16Int64,
+ ExtendS32Int64,
+ AddInt32,
+ SubInt32,
+ MulInt32,
+ DivSInt32,
+ DivUInt32,
+ RemSInt32,
+ RemUInt32,
+ AndInt32,
+ OrInt32,
+ XorInt32,
+ ShlInt32,
+ ShrUInt32,
+ ShrSInt32,
+ RotLInt32,
+ RotRInt32,
+ EqInt32,
+ NeInt32,
+ LtSInt32,
+ LtUInt32,
+ LeSInt32,
+ LeUInt32,
+ GtSInt32,
+ GtUInt32,
+ GeSInt32,
+ GeUInt32,
+ AddInt64,
+ SubInt64,
+ MulInt64,
+ DivSInt64,
+ DivUInt64,
+ RemSInt64,
+ RemUInt64,
+ AndInt64,
+ OrInt64,
+ XorInt64,
+ ShlInt64,
+ ShrUInt64,
+ ShrSInt64,
+ RotLInt64,
+ RotRInt64,
+ EqInt64,
+ NeInt64,
+ LtSInt64,
+ LtUInt64,
+ LeSInt64,
+ LeUInt64,
+ GtSInt64,
+ GtUInt64,
+ GeSInt64,
+ GeUInt64,
+ AddFloat32,
+ SubFloat32,
+ MulFloat32,
+ DivFloat32,
+ CopySignFloat32,
+ MinFloat32,
+ MaxFloat32,
+ EqFloat32,
+ NeFloat32,
+ LtFloat32,
+ LeFloat32,
+ GtFloat32,
+ GeFloat32,
+ AddFloat64,
+ SubFloat64,
+ MulFloat64,
+ DivFloat64,
+ CopySignFloat64,
+ MinFloat64,
+ MaxFloat64,
+ EqFloat64,
+ NeFloat64,
+ LtFloat64,
+ LeFloat64,
+ GtFloat64,
+ GeFloat64,
+ MemorySize,
+ MemoryGrow,
+ AtomicRMWAdd,
+ AtomicRMWSub,
+ AtomicRMWAnd,
+ AtomicRMWOr,
+ AtomicRMWXor,
+ AtomicRMWXchg,
+ SplatVecI8x16,
+ ExtractLaneSVecI8x16,
+ ExtractLaneUVecI8x16,
+ ReplaceLaneVecI8x16,
+ SplatVecI16x8,
+ ExtractLaneSVecI16x8,
+ ExtractLaneUVecI16x8,
+ ReplaceLaneVecI16x8,
+ SplatVecI32x4,
+ ExtractLaneVecI32x4,
+ ReplaceLaneVecI32x4,
+ SplatVecI64x2,
+ ExtractLaneVecI64x2,
+ ReplaceLaneVecI64x2,
+ SplatVecF32x4,
+ ExtractLaneVecF32x4,
+ ReplaceLaneVecF32x4,
+ SplatVecF64x2,
+ ExtractLaneVecF64x2,
+ ReplaceLaneVecF64x2,
+ EqVecI8x16,
+ NeVecI8x16,
+ LtSVecI8x16,
+ LtUVecI8x16,
+ GtSVecI8x16,
+ GtUVecI8x16,
+ LeSVecI8x16,
+ LeUVecI8x16,
+ GeSVecI8x16,
+ GeUVecI8x16,
+ EqVecI16x8,
+ NeVecI16x8,
+ LtSVecI16x8,
+ LtUVecI16x8,
+ GtSVecI16x8,
+ GtUVecI16x8,
+ LeSVecI16x8,
+ LeUVecI16x8,
+ GeSVecI16x8,
+ GeUVecI16x8,
+ EqVecI32x4,
+ NeVecI32x4,
+ LtSVecI32x4,
+ LtUVecI32x4,
+ GtSVecI32x4,
+ GtUVecI32x4,
+ LeSVecI32x4,
+ LeUVecI32x4,
+ GeSVecI32x4,
+ GeUVecI32x4,
+ EqVecF32x4,
+ NeVecF32x4,
+ LtVecF32x4,
+ GtVecF32x4,
+ LeVecF32x4,
+ GeVecF32x4,
+ EqVecF64x2,
+ NeVecF64x2,
+ LtVecF64x2,
+ GtVecF64x2,
+ LeVecF64x2,
+ GeVecF64x2,
+ NotVec128,
+ AndVec128,
+ OrVec128,
+ XorVec128,
+ AndNotVec128,
+ BitselectVec128,
+ NegVecI8x16,
+ AnyTrueVecI8x16,
+ AllTrueVecI8x16,
+ ShlVecI8x16,
+ ShrSVecI8x16,
+ ShrUVecI8x16,
+ AddVecI8x16,
+ AddSatSVecI8x16,
+ AddSatUVecI8x16,
+ SubVecI8x16,
+ SubSatSVecI8x16,
+ SubSatUVecI8x16,
+ MulVecI8x16,
+ MinSVecI8x16,
+ MinUVecI8x16,
+ MaxSVecI8x16,
+ MaxUVecI8x16,
+ NegVecI16x8,
+ AnyTrueVecI16x8,
+ AllTrueVecI16x8,
+ ShlVecI16x8,
+ ShrSVecI16x8,
+ ShrUVecI16x8,
+ AddVecI16x8,
+ AddSatSVecI16x8,
+ AddSatUVecI16x8,
+ SubVecI16x8,
+ SubSatSVecI16x8,
+ SubSatUVecI16x8,
+ MulVecI16x8,
+ MinSVecI16x8,
+ MinUVecI16x8,
+ MaxSVecI16x8,
+ MaxUVecI16x8,
+ DotSVecI16x8ToVecI32x4,
+ NegVecI32x4,
+ AnyTrueVecI32x4,
+ AllTrueVecI32x4,
+ ShlVecI32x4,
+ ShrSVecI32x4,
+ ShrUVecI32x4,
+ AddVecI32x4,
+ SubVecI32x4,
+ MulVecI32x4,
+ MinSVecI32x4,
+ MinUVecI32x4,
+ MaxSVecI32x4,
+ MaxUVecI32x4,
+ NegVecI64x2,
+ AnyTrueVecI64x2,
+ AllTrueVecI64x2,
+ ShlVecI64x2,
+ ShrSVecI64x2,
+ ShrUVecI64x2,
+ AddVecI64x2,
+ SubVecI64x2,
+ AbsVecF32x4,
+ NegVecF32x4,
+ SqrtVecF32x4,
+ QFMAVecF32x4,
+ QFMSVecF32x4,
+ AddVecF32x4,
+ SubVecF32x4,
+ MulVecF32x4,
+ DivVecF32x4,
+ MinVecF32x4,
+ MaxVecF32x4,
+ AbsVecF64x2,
+ NegVecF64x2,
+ SqrtVecF64x2,
+ QFMAVecF64x2,
+ QFMSVecF64x2,
+ AddVecF64x2,
+ SubVecF64x2,
+ MulVecF64x2,
+ DivVecF64x2,
+ MinVecF64x2,
+ MaxVecF64x2,
+ TruncSatSVecF32x4ToVecI32x4,
+ TruncSatUVecF32x4ToVecI32x4,
+ TruncSatSVecF64x2ToVecI64x2,
+ TruncSatUVecF64x2ToVecI64x2,
+ ConvertSVecI32x4ToVecF32x4,
+ ConvertUVecI32x4ToVecF32x4,
+ ConvertSVecI64x2ToVecF64x2,
+ ConvertUVecI64x2ToVecF64x2,
+ LoadSplatVec8x16,
+ LoadSplatVec16x8,
+ LoadSplatVec32x4,
+ LoadSplatVec64x2,
+ LoadExtSVec8x8ToVecI16x8,
+ LoadExtUVec8x8ToVecI16x8,
+ LoadExtSVec16x4ToVecI32x4,
+ LoadExtUVec16x4ToVecI32x4,
+ LoadExtSVec32x2ToVecI64x2,
+ LoadExtUVec32x2ToVecI64x2,
+ NarrowSVecI16x8ToVecI8x16,
+ NarrowUVecI16x8ToVecI8x16,
+ NarrowSVecI32x4ToVecI16x8,
+ NarrowUVecI32x4ToVecI16x8,
+ WidenLowSVecI8x16ToVecI16x8,
+ WidenHighSVecI8x16ToVecI16x8,
+ WidenLowUVecI8x16ToVecI16x8,
+ WidenHighUVecI8x16ToVecI16x8,
+ WidenLowSVecI16x8ToVecI32x4,
+ WidenHighSVecI16x8ToVecI32x4,
+ WidenLowUVecI16x8ToVecI32x4,
+ WidenHighUVecI16x8ToVecI32x4,
+ SwizzleVec8x16
+}
+
+internal external var ClzInt32: Operations
+
+internal external var CtzInt32: Operations
+
+internal external var PopcntInt32: Operations
+
+internal external var NegFloat32: Operations
+
+internal external var AbsFloat32: Operations
+
+internal external var CeilFloat32: Operations
+
+internal external var FloorFloat32: Operations
+
+internal external var TruncFloat32: Operations
+
+internal external var NearestFloat32: Operations
+
+internal external var SqrtFloat32: Operations
+
+internal external var EqZInt32: Operations
+
+internal external var ClzInt64: Operations
+
+internal external var CtzInt64: Operations
+
+internal external var PopcntInt64: Operations
+
+internal external var NegFloat64: Operations
+
+internal external var AbsFloat64: Operations
+
+internal external var CeilFloat64: Operations
+
+internal external var FloorFloat64: Operations
+
+internal external var TruncFloat64: Operations
+
+internal external var NearestFloat64: Operations
+
+internal external var SqrtFloat64: Operations
+
+internal external var EqZInt64: Operations
+
+internal external var ExtendSInt32: Operations
+
+internal external var ExtendUInt32: Operations
+
+internal external var WrapInt64: Operations
+
+internal external var TruncSFloat32ToInt32: Operations
+
+internal external var TruncSFloat32ToInt64: Operations
+
+internal external var TruncUFloat32ToInt32: Operations
+
+internal external var TruncUFloat32ToInt64: Operations
+
+internal external var TruncSFloat64ToInt32: Operations
+
+internal external var TruncSFloat64ToInt64: Operations
+
+internal external var TruncUFloat64ToInt32: Operations
+
+internal external var TruncUFloat64ToInt64: Operations
+
+internal external var TruncSatSFloat32ToInt32: Operations
+
+internal external var TruncSatSFloat32ToInt64: Operations
+
+internal external var TruncSatUFloat32ToInt32: Operations
+
+internal external var TruncSatUFloat32ToInt64: Operations
+
+internal external var TruncSatSFloat64ToInt32: Operations
+
+internal external var TruncSatSFloat64ToInt64: Operations
+
+internal external var TruncSatUFloat64ToInt32: Operations
+
+internal external var TruncSatUFloat64ToInt64: Operations
+
+internal external var ReinterpretFloat32: Operations
+
+internal external var ReinterpretFloat64: Operations
+
+internal external var ConvertSInt32ToFloat32: Operations
+
+internal external var ConvertSInt32ToFloat64: Operations
+
+internal external var ConvertUInt32ToFloat32: Operations
+
+internal external var ConvertUInt32ToFloat64: Operations
+
+internal external var ConvertSInt64ToFloat32: Operations
+
+internal external var ConvertSInt64ToFloat64: Operations
+
+internal external var ConvertUInt64ToFloat32: Operations
+
+internal external var ConvertUInt64ToFloat64: Operations
+
+internal external var PromoteFloat32: Operations
+
+internal external var DemoteFloat64: Operations
+
+internal external var ReinterpretInt32: Operations
+
+internal external var ReinterpretInt64: Operations
+
+internal external var ExtendS8Int32: Operations
+
+internal external var ExtendS16Int32: Operations
+
+internal external var ExtendS8Int64: Operations
+
+internal external var ExtendS16Int64: Operations
+
+internal external var ExtendS32Int64: Operations
+
+internal external var AddInt32: Operations
+
+internal external var SubInt32: Operations
+
+internal external var MulInt32: Operations
+
+internal external var DivSInt32: Operations
+
+internal external var DivUInt32: Operations
+
+internal external var RemSInt32: Operations
+
+internal external var RemUInt32: Operations
+
+internal external var AndInt32: Operations
+
+internal external var OrInt32: Operations
+
+internal external var XorInt32: Operations
+
+internal external var ShlInt32: Operations
+
+internal external var ShrUInt32: Operations
+
+internal external var ShrSInt32: Operations
+
+internal external var RotLInt32: Operations
+
+internal external var RotRInt32: Operations
+
+internal external var EqInt32: Operations
+
+internal external var NeInt32: Operations
+
+internal external var LtSInt32: Operations
+
+internal external var LtUInt32: Operations
+
+internal external var LeSInt32: Operations
+
+internal external var LeUInt32: Operations
+
+internal external var GtSInt32: Operations
+
+internal external var GtUInt32: Operations
+
+internal external var GeSInt32: Operations
+
+internal external var GeUInt32: Operations
+
+internal external var AddInt64: Operations
+
+internal external var SubInt64: Operations
+
+internal external var MulInt64: Operations
+
+internal external var DivSInt64: Operations
+
+internal external var DivUInt64: Operations
+
+internal external var RemSInt64: Operations
+
+internal external var RemUInt64: Operations
+
+internal external var AndInt64: Operations
+
+internal external var OrInt64: Operations
+
+internal external var XorInt64: Operations
+
+internal external var ShlInt64: Operations
+
+internal external var ShrUInt64: Operations
+
+internal external var ShrSInt64: Operations
+
+internal external var RotLInt64: Operations
+
+internal external var RotRInt64: Operations
+
+internal external var EqInt64: Operations
+
+internal external var NeInt64: Operations
+
+internal external var LtSInt64: Operations
+
+internal external var LtUInt64: Operations
+
+internal external var LeSInt64: Operations
+
+internal external var LeUInt64: Operations
+
+internal external var GtSInt64: Operations
+
+internal external var GtUInt64: Operations
+
+internal external var GeSInt64: Operations
+
+internal external var GeUInt64: Operations
+
+internal external var AddFloat32: Operations
+
+internal external var SubFloat32: Operations
+
+internal external var MulFloat32: Operations
+
+internal external var DivFloat32: Operations
+
+internal external var CopySignFloat32: Operations
+
+internal external var MinFloat32: Operations
+
+internal external var MaxFloat32: Operations
+
+internal external var EqFloat32: Operations
+
+internal external var NeFloat32: Operations
+
+internal external var LtFloat32: Operations
+
+internal external var LeFloat32: Operations
+
+internal external var GtFloat32: Operations
+
+internal external var GeFloat32: Operations
+
+internal external var AddFloat64: Operations
+
+internal external var SubFloat64: Operations
+
+internal external var MulFloat64: Operations
+
+internal external var DivFloat64: Operations
+
+internal external var CopySignFloat64: Operations
+
+internal external var MinFloat64: Operations
+
+internal external var MaxFloat64: Operations
+
+internal external var EqFloat64: Operations
+
+internal external var NeFloat64: Operations
+
+internal external var LtFloat64: Operations
+
+internal external var LeFloat64: Operations
+
+internal external var GtFloat64: Operations
+
+internal external var GeFloat64: Operations
+
+internal external var MemorySize: Operations
+
+internal external var MemoryGrow: Operations
+
+internal external var AtomicRMWAdd: Operations
+
+internal external var AtomicRMWSub: Operations
+
+internal external var AtomicRMWAnd: Operations
+
+internal external var AtomicRMWOr: Operations
+
+internal external var AtomicRMWXor: Operations
+
+internal external var AtomicRMWXchg: Operations
+
+internal external var SplatVecI8x16: Operations
+
+internal external var ExtractLaneSVecI8x16: Operations
+
+internal external var ExtractLaneUVecI8x16: Operations
+
+internal external var ReplaceLaneVecI8x16: Operations
+
+internal external var SplatVecI16x8: Operations
+
+internal external var ExtractLaneSVecI16x8: Operations
+
+internal external var ExtractLaneUVecI16x8: Operations
+
+internal external var ReplaceLaneVecI16x8: Operations
+
+internal external var SplatVecI32x4: Operations
+
+internal external var ExtractLaneVecI32x4: Operations
+
+internal external var ReplaceLaneVecI32x4: Operations
+
+internal external var SplatVecI64x2: Operations
+
+internal external var ExtractLaneVecI64x2: Operations
+
+internal external var ReplaceLaneVecI64x2: Operations
+
+internal external var SplatVecF32x4: Operations
+
+internal external var ExtractLaneVecF32x4: Operations
+
+internal external var ReplaceLaneVecF32x4: Operations
+
+internal external var SplatVecF64x2: Operations
+
+internal external var ExtractLaneVecF64x2: Operations
+
+internal external var ReplaceLaneVecF64x2: Operations
+
+internal external var EqVecI8x16: Operations
+
+internal external var NeVecI8x16: Operations
+
+internal external var LtSVecI8x16: Operations
+
+internal external var LtUVecI8x16: Operations
+
+internal external var GtSVecI8x16: Operations
+
+internal external var GtUVecI8x16: Operations
+
+internal external var LeSVecI8x16: Operations
+
+internal external var LeUVecI8x16: Operations
+
+internal external var GeSVecI8x16: Operations
+
+internal external var GeUVecI8x16: Operations
+
+internal external var EqVecI16x8: Operations
+
+internal external var NeVecI16x8: Operations
+
+internal external var LtSVecI16x8: Operations
+
+internal external var LtUVecI16x8: Operations
+
+internal external var GtSVecI16x8: Operations
+
+internal external var GtUVecI16x8: Operations
+
+internal external var LeSVecI16x8: Operations
+
+internal external var LeUVecI16x8: Operations
+
+internal external var GeSVecI16x8: Operations
+
+internal external var GeUVecI16x8: Operations
+
+internal external var EqVecI32x4: Operations
+
+internal external var NeVecI32x4: Operations
+
+internal external var LtSVecI32x4: Operations
+
+internal external var LtUVecI32x4: Operations
+
+internal external var GtSVecI32x4: Operations
+
+internal external var GtUVecI32x4: Operations
+
+internal external var LeSVecI32x4: Operations
+
+internal external var LeUVecI32x4: Operations
+
+internal external var GeSVecI32x4: Operations
+
+internal external var GeUVecI32x4: Operations
+
+internal external var EqVecF32x4: Operations
+
+internal external var NeVecF32x4: Operations
+
+internal external var LtVecF32x4: Operations
+
+internal external var GtVecF32x4: Operations
+
+internal external var LeVecF32x4: Operations
+
+internal external var GeVecF32x4: Operations
+
+internal external var EqVecF64x2: Operations
+
+internal external var NeVecF64x2: Operations
+
+internal external var LtVecF64x2: Operations
+
+internal external var GtVecF64x2: Operations
+
+internal external var LeVecF64x2: Operations
+
+internal external var GeVecF64x2: Operations
+
+internal external var NotVec128: Operations
+
+internal external var AndVec128: Operations
+
+internal external var OrVec128: Operations
+
+internal external var XorVec128: Operations
+
+internal external var AndNotVec128: Operations
+
+internal external var BitselectVec128: Operations
+
+internal external var NegVecI8x16: Operations
+
+internal external var AnyTrueVecI8x16: Operations
+
+internal external var AllTrueVecI8x16: Operations
+
+internal external var ShlVecI8x16: Operations
+
+internal external var ShrSVecI8x16: Operations
+
+internal external var ShrUVecI8x16: Operations
+
+internal external var AddVecI8x16: Operations
+
+internal external var AddSatSVecI8x16: Operations
+
+internal external var AddSatUVecI8x16: Operations
+
+internal external var SubVecI8x16: Operations
+
+internal external var SubSatSVecI8x16: Operations
+
+internal external var SubSatUVecI8x16: Operations
+
+internal external var MulVecI8x16: Operations
+
+internal external var MinSVecI8x16: Operations
+
+internal external var MinUVecI8x16: Operations
+
+internal external var MaxSVecI8x16: Operations
+
+internal external var MaxUVecI8x16: Operations
+
+internal external var NegVecI16x8: Operations
+
+internal external var AnyTrueVecI16x8: Operations
+
+internal external var AllTrueVecI16x8: Operations
+
+internal external var ShlVecI16x8: Operations
+
+internal external var ShrSVecI16x8: Operations
+
+internal external var ShrUVecI16x8: Operations
+
+internal external var AddVecI16x8: Operations
+
+internal external var AddSatSVecI16x8: Operations
+
+internal external var AddSatUVecI16x8: Operations
+
+internal external var SubVecI16x8: Operations
+
+internal external var SubSatSVecI16x8: Operations
+
+internal external var SubSatUVecI16x8: Operations
+
+internal external var MulVecI16x8: Operations
+
+internal external var MinSVecI16x8: Operations
+
+internal external var MinUVecI16x8: Operations
+
+internal external var MaxSVecI16x8: Operations
+
+internal external var MaxUVecI16x8: Operations
+
+internal external var DotSVecI16x8ToVecI32x4: Operations
+
+internal external var NegVecI32x4: Operations
+
+internal external var AnyTrueVecI32x4: Operations
+
+internal external var AllTrueVecI32x4: Operations
+
+internal external var ShlVecI32x4: Operations
+
+internal external var ShrSVecI32x4: Operations
+
+internal external var ShrUVecI32x4: Operations
+
+internal external var AddVecI32x4: Operations
+
+internal external var SubVecI32x4: Operations
+
+internal external var MulVecI32x4: Operations
+
+internal external var MinSVecI32x4: Operations
+
+internal external var MinUVecI32x4: Operations
+
+internal external var MaxSVecI32x4: Operations
+
+internal external var MaxUVecI32x4: Operations
+
+internal external var NegVecI64x2: Operations
+
+internal external var AnyTrueVecI64x2: Operations
+
+internal external var AllTrueVecI64x2: Operations
+
+internal external var ShlVecI64x2: Operations
+
+internal external var ShrSVecI64x2: Operations
+
+internal external var ShrUVecI64x2: Operations
+
+internal external var AddVecI64x2: Operations
+
+internal external var SubVecI64x2: Operations
+
+internal external var AbsVecF32x4: Operations
+
+internal external var NegVecF32x4: Operations
+
+internal external var SqrtVecF32x4: Operations
+
+internal external var QFMAVecF32x4: Operations
+
+internal external var QFMSVecF32x4: Operations
+
+internal external var AddVecF32x4: Operations
+
+internal external var SubVecF32x4: Operations
+
+internal external var MulVecF32x4: Operations
+
+internal external var DivVecF32x4: Operations
+
+internal external var MinVecF32x4: Operations
+
+internal external var MaxVecF32x4: Operations
+
+internal external var AbsVecF64x2: Operations
+
+internal external var NegVecF64x2: Operations
+
+internal external var SqrtVecF64x2: Operations
+
+internal external var QFMAVecF64x2: Operations
+
+internal external var QFMSVecF64x2: Operations
+
+internal external var AddVecF64x2: Operations
+
+internal external var SubVecF64x2: Operations
+
+internal external var MulVecF64x2: Operations
+
+internal external var DivVecF64x2: Operations
+
+internal external var MinVecF64x2: Operations
+
+internal external var MaxVecF64x2: Operations
+
+internal external var TruncSatSVecF32x4ToVecI32x4: Operations
+
+internal external var TruncSatUVecF32x4ToVecI32x4: Operations
+
+internal external var TruncSatSVecF64x2ToVecI64x2: Operations
+
+internal external var TruncSatUVecF64x2ToVecI64x2: Operations
+
+internal external var ConvertSVecI32x4ToVecF32x4: Operations
+
+internal external var ConvertUVecI32x4ToVecF32x4: Operations
+
+internal external var ConvertSVecI64x2ToVecF64x2: Operations
+
+internal external var ConvertUVecI64x2ToVecF64x2: Operations
+
+internal external var LoadSplatVec8x16: Operations
+
+internal external var LoadSplatVec16x8: Operations
+
+internal external var LoadSplatVec32x4: Operations
+
+internal external var LoadSplatVec64x2: Operations
+
+internal external var LoadExtSVec8x8ToVecI16x8: Operations
+
+internal external var LoadExtUVec8x8ToVecI16x8: Operations
+
+internal external var LoadExtSVec16x4ToVecI32x4: Operations
+
+internal external var LoadExtUVec16x4ToVecI32x4: Operations
+
+internal external var LoadExtSVec32x2ToVecI64x2: Operations
+
+internal external var LoadExtUVec32x2ToVecI64x2: Operations
+
+internal external var NarrowSVecI16x8ToVecI8x16: Operations
+
+internal external var NarrowUVecI16x8ToVecI8x16: Operations
+
+internal external var NarrowSVecI32x4ToVecI16x8: Operations
+
+internal external var NarrowUVecI32x4ToVecI16x8: Operations
+
+internal external var WidenLowSVecI8x16ToVecI16x8: Operations
+
+internal external var WidenHighSVecI8x16ToVecI16x8: Operations
+
+internal external var WidenLowUVecI8x16ToVecI16x8: Operations
+
+internal external var WidenHighUVecI8x16ToVecI16x8: Operations
+
+internal external var WidenLowSVecI16x8ToVecI32x4: Operations
+
+internal external var WidenHighSVecI16x8ToVecI32x4: Operations
+
+internal external var WidenLowUVecI16x8ToVecI32x4: Operations
+
+internal external var WidenHighUVecI16x8ToVecI32x4: Operations
+
+internal external var SwizzleVec8x16: Operations
+
+internal external interface `T$2` {
+ fun get(index: Number, type: Type): ExpressionRef
+ fun set(index: Number, value: ExpressionRef): ExpressionRef
+ fun tee(index: Number, value: ExpressionRef, type: Type): ExpressionRef
+}
+
+internal external interface `T$3` {
+ fun get(name: String, type: Type): ExpressionRef
+ fun set(name: String, value: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$4` {
+ fun size(): ExpressionRef
+ fun grow(value: ExpressionRef): ExpressionRef
+ fun init(segment: Number, dest: ExpressionRef, offset: ExpressionRef, size: ExpressionRef): ExpressionRef
+ fun copy(dest: ExpressionRef, source: ExpressionRef, size: ExpressionRef): ExpressionRef
+ fun fill(dest: ExpressionRef, value: ExpressionRef, size: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$5` {
+ fun drop(segment: Number): ExpressionRef
+}
+
+internal external interface `T$6` {
+ fun f32(value: ExpressionRef): ExpressionRef
+ fun f64(value: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$7` {
+ fun add(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun sub(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun and(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun or(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun xor(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun xchg(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun cmpxchg(offset: Number, ptr: ExpressionRef, expected: ExpressionRef, replacement: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$8` {
+ fun load(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8_u(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16_u(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store8(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store16(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ var rmw: `T$7`
+ var rmw8_u: `T$7`
+ var rmw16_u: `T$7`
+ fun wait(ptr: ExpressionRef, expected: ExpressionRef, timeout: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$9` {
+ fun load(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store8(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store16(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun const(value: Number): ExpressionRef
+ fun clz(value: ExpressionRef): ExpressionRef
+ fun ctz(value: ExpressionRef): ExpressionRef
+ fun popcnt(value: ExpressionRef): ExpressionRef
+ fun eqz(value: ExpressionRef): ExpressionRef
+ var trunc_s: `T$6`
+ var trunc_u: `T$6`
+ var trunc_s_sat: `T$6`
+ var trunc_u_sat: `T$6`
+ fun reinterpret(value: ExpressionRef): ExpressionRef
+ fun extend8_s(value: ExpressionRef): ExpressionRef
+ fun extend16_s(value: ExpressionRef): ExpressionRef
+ fun wrap(value: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rem_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rem_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun and(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun or(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun xor(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun shl(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun shr_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun shr_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rotl(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rotr(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ var atomic: `T$8`
+ fun pop(): ExpressionRef
+}
+
+internal external interface `T$10` {
+ fun load(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8_u(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16_u(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun load32_u(offset: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store8(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store16(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store32(offset: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ var rmw: `T$7`
+ var rmw8_u: `T$7`
+ var rmw16_u: `T$7`
+ var rmw32_u: `T$7`
+ fun wait(ptr: ExpressionRef, expected: ExpressionRef, timeout: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$11` {
+ fun load(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load32_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load32_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store8(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store16(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun store32(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun const(low: Number, high: Number): ExpressionRef
+ fun clz(value: ExpressionRef): ExpressionRef
+ fun ctz(value: ExpressionRef): ExpressionRef
+ fun popcnt(value: ExpressionRef): ExpressionRef
+ fun eqz(value: ExpressionRef): ExpressionRef
+ var trunc_s: `T$6`
+ var trunc_u: `T$6`
+ var trunc_s_sat: `T$6`
+ var trunc_u_sat: `T$6`
+ fun reinterpret(value: ExpressionRef): ExpressionRef
+ fun extend8_s(value: ExpressionRef): ExpressionRef
+ fun extend16_s(value: ExpressionRef): ExpressionRef
+ fun extend32_s(value: ExpressionRef): ExpressionRef
+ fun extend_s(value: ExpressionRef): ExpressionRef
+ fun extend_u(value: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rem_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rem_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun and(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun or(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun xor(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun shl(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun shr_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun shr_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rotl(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun rotr(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ var atomic: `T$10`
+ fun pop(): ExpressionRef
+}
+
+internal external interface `T$12` {
+ fun load(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun const(value: Number): ExpressionRef
+ fun const_bits(value: Number): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun abs(value: ExpressionRef): ExpressionRef
+ fun ceil(value: ExpressionRef): ExpressionRef
+ fun floor(value: ExpressionRef): ExpressionRef
+ fun trunc(value: ExpressionRef): ExpressionRef
+ fun nearest(value: ExpressionRef): ExpressionRef
+ fun sqrt(value: ExpressionRef): ExpressionRef
+ fun reinterpret(value: ExpressionRef): ExpressionRef
+ var convert_s: `T$6`
+ var convert_u: `T$6`
+ fun demote(value: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun copysign(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun pop(): ExpressionRef
+}
+
+internal external interface `T$13` {
+ fun load(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun const(value: Number): ExpressionRef
+ fun const_bits(low: Number, high: Number): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun abs(value: ExpressionRef): ExpressionRef
+ fun ceil(value: ExpressionRef): ExpressionRef
+ fun floor(value: ExpressionRef): ExpressionRef
+ fun trunc(value: ExpressionRef): ExpressionRef
+ fun nearest(value: ExpressionRef): ExpressionRef
+ fun sqrt(value: ExpressionRef): ExpressionRef
+ fun reinterpret(value: ExpressionRef): ExpressionRef
+ var convert_s: `T$6`
+ var convert_u: `T$6`
+ fun promote(value: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun copysign(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun pop(): ExpressionRef
+}
+
+internal external interface `T$14` {
+ fun load(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun store(offset: Number, align: Number, ptr: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun const(value: Number): ExpressionRef
+ fun not(value: ExpressionRef): ExpressionRef
+ fun and(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun or(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun xor(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun andnot(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun bitselect(left: ExpressionRef, right: ExpressionRef, cond: ExpressionRef): ExpressionRef
+ fun pop(): ExpressionRef
+}
+
+internal external interface `T$15` {
+ fun splat(value: ExpressionRef): ExpressionRef
+ fun extract_lane_s(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun extract_lane_u(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun replace_lane(vec: ExpressionRef, index: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun any_true(value: ExpressionRef): ExpressionRef
+ fun all_true(value: ExpressionRef): ExpressionRef
+ fun shl(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_s(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_u(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun add_saturate_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun add_saturate_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub_saturate_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub_saturate_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun avgr_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun narrow_i16x8_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun narrow_i16x8_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$16` {
+ fun splat(value: ExpressionRef): ExpressionRef
+ fun extract_lane_s(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun extract_lane_u(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun replace_lane(vec: ExpressionRef, index: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun any_true(value: ExpressionRef): ExpressionRef
+ fun all_true(value: ExpressionRef): ExpressionRef
+ fun shl(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_s(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_u(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun add_saturate_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun add_saturate_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub_saturate_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub_saturate_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun avgr_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun narrow_i32x4_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun narrow_i32x4_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun widen_low_i8x16_s(value: ExpressionRef): ExpressionRef
+ fun widen_high_i8x16_s(value: ExpressionRef): ExpressionRef
+ fun widen_low_i8x16_u(value: ExpressionRef): ExpressionRef
+ fun widen_high_i8x16_u(value: ExpressionRef): ExpressionRef
+ fun load8x8_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load8x8_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$17` {
+ fun splat(value: ExpressionRef): ExpressionRef
+ fun extract_lane(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun replace_lane(vec: ExpressionRef, index: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_s(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge_u(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun any_true(value: ExpressionRef): ExpressionRef
+ fun all_true(value: ExpressionRef): ExpressionRef
+ fun shl(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_s(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_u(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun trunc_sat_f32x4_s(value: ExpressionRef): ExpressionRef
+ fun trunc_sat_f32x4_u(value: ExpressionRef): ExpressionRef
+ fun widen_low_i16x8_s(value: ExpressionRef): ExpressionRef
+ fun widen_high_i16x8_s(value: ExpressionRef): ExpressionRef
+ fun widen_low_i16x8_u(value: ExpressionRef): ExpressionRef
+ fun widen_high_i16x8_u(value: ExpressionRef): ExpressionRef
+ fun load16x4_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load16x4_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$18` {
+ fun splat(value: ExpressionRef): ExpressionRef
+ fun extract_lane(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun replace_lane(vec: ExpressionRef, index: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun any_true(value: ExpressionRef): ExpressionRef
+ fun all_true(value: ExpressionRef): ExpressionRef
+ fun shl(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_s(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun shr_u(vec: ExpressionRef, shift: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun trunc_sat_f64x2_s(value: ExpressionRef): ExpressionRef
+ fun trunc_sat_f64x2_u(value: ExpressionRef): ExpressionRef
+ fun load32x2_s(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+ fun load32x2_u(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$19` {
+ fun splat(value: ExpressionRef): ExpressionRef
+ fun extract_lane(vec: ExpressionRef, index: ExpressionRef): ExpressionRef
+ fun replace_lane(vec: ExpressionRef, index: ExpressionRef, value: ExpressionRef): ExpressionRef
+ fun eq(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ne(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun lt(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun gt(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun le(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun ge(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun abs(value: ExpressionRef): ExpressionRef
+ fun neg(value: ExpressionRef): ExpressionRef
+ fun sqrt(value: ExpressionRef): ExpressionRef
+ fun qfma(a: ExpressionRef, b: ExpressionRef, c: ExpressionRef): ExpressionRef
+ fun qfms(a: ExpressionRef, b: ExpressionRef, c: ExpressionRef): ExpressionRef
+ fun add(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun sub(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun mul(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun div(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun min(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun max(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun convert_i32x4_s(value: ExpressionRef): ExpressionRef
+ fun convert_i32x4_u(value: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$20` {
+ fun shuffle(left: ExpressionRef, right: ExpressionRef, mask: Array): ExpressionRef
+ fun swizzle(left: ExpressionRef, right: ExpressionRef): ExpressionRef
+ fun load_splat(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$21` {
+ fun load_splat(offset: Number, align: Number, ptr: ExpressionRef): ExpressionRef
+}
+
+internal external interface `T$22` {
+ fun pop(): ExpressionRef
+}
+
+internal external interface `T$23` {
+ fun `null`(): ExpressionRef
+ fun is_null(value: ExpressionRef): ExpressionRef
+ fun func(name: String): ExpressionRef
+}
+
+internal external interface `T$24` {
+ fun notify(ptr: ExpressionRef, notifyCount: ExpressionRef): ExpressionRef
+ fun fence(): ExpressionRef
+}
+
+internal external interface `T$25` {
+ fun make(elements: Array): ExpressionRef
+ fun extract(tuple: ExpressionRef, index: Number): ExpressionRef
+}
+
+internal external interface `T$26` {
+ var imported: Boolean
+ var segments: Array
+}
+
+internal external interface `T$27` {
+ var binary: Uint8Array
+ var sourceMap: String?
+}
+
+internal open external class Module {
+ open var ptr: Number
+ open fun block(label: String, children: Array, resultType: Type = definedExternally): ExpressionRef
+ open fun `if`(
+ condition: ExpressionRef,
+ ifTrue: ExpressionRef,
+ ifFalse: ExpressionRef = definedExternally
+ ): ExpressionRef
+
+ open fun loop(label: String, body: ExpressionRef): ExpressionRef
+ open fun br(
+ label: String,
+ condition: ExpressionRef = definedExternally,
+ value: ExpressionRef = definedExternally
+ ): ExpressionRef
+
+ open fun br_if(
+ label: String,
+ condition: ExpressionRef = definedExternally,
+ value: ExpressionRef = definedExternally
+ ): ExpressionRef
+
+ open fun switch(
+ labels: Array,
+ defaultLabel: String,
+ condition: ExpressionRef,
+ value: ExpressionRef = definedExternally
+ ): ExpressionRef
+
+ open fun call(name: String, operands: Array, returnType: Type): ExpressionRef
+ open fun return_call(name: String, operands: Array, returnType: Type): ExpressionRef
+ open fun call_indirect(
+ target: ExpressionRef,
+ operands: Array,
+ params: Type,
+ results: Type
+ ): ExpressionRef
+
+ open fun return_call_indirect(
+ target: ExpressionRef,
+ operands: Array,
+ params: Type,
+ results: Type
+ ): ExpressionRef
+
+ open var local: `T$2`
+ open var global: `T$3`
+ open var memory: `T$4`
+ open var data: `T$5`
+ open var i32: `T$9`
+ open var i64: `T$11`
+ open var f32: `T$12`
+ open var f64: `T$13`
+ open var v128: `T$14`
+ open var i8x16: `T$15`
+ open var i16x8: `T$16`
+ open var i32x4: `T$17`
+ open var i64x2: `T$18`
+ open var f32x4: `T$19`
+ open var f64x2: `T$19`
+ open var v8x16: `T$20`
+ open var v16x8: `T$21`
+ open var v32x4: `T$21`
+ open var v64x2: `T$21`
+ open var funcref: `T$22`
+ open var anyref: `T$22`
+ open var nullref: `T$22`
+ open var exnref: `T$22`
+ open var ref: `T$23`
+ open var atomic: `T$24`
+ open var tuple: `T$25`
+ open fun `try`(body: ExpressionRef, catchBody: ExpressionRef): ExpressionRef
+ open fun `throw`(event: String, operands: Array): ExpressionRef
+ open fun rethrow(exnref: ExpressionRef): ExpressionRef
+ open fun br_on_exn(label: String, event: String, exnref: ExpressionRef): ExpressionRef
+ open fun push(value: ExpressionRef): ExpressionRef
+ open fun select(
+ condition: ExpressionRef,
+ ifTrue: ExpressionRef,
+ ifFalse: ExpressionRef,
+ type: Type = definedExternally
+ ): ExpressionRef
+
+ open fun drop(value: ExpressionRef): ExpressionRef
+ open fun `return`(value: ExpressionRef = definedExternally): ExpressionRef
+ open fun host(op: Operations, name: String, operands: Array): ExpressionRef
+ open fun nop(): ExpressionRef
+ open fun unreachable(): ExpressionRef
+ open fun addFunction(name: String, params: Type, results: Type, vars: Array, body: ExpressionRef): FunctionRef
+ open fun getFunction(name: String): FunctionRef
+ open fun removeFunction(name: String)
+ open fun getNumFunctions(): Number
+ open fun getFunctionByIndex(index: Number): FunctionRef
+ open fun addGlobal(name: String, type: Type, mutable: Boolean, init: ExpressionRef): GlobalRef
+ open fun getGlobal(name: String): GlobalRef
+ open fun removeGlobal(name: String)
+ open fun addEvent(name: String, attribute: Number, params: Type, results: Type): EventRef
+ open fun getEvent(name: String): EventRef
+ open fun removeEvent(name: String)
+ open fun addFunctionImport(
+ internalName: String,
+ externalModuleName: String,
+ externalBaseName: String,
+ params: Type,
+ results: Type
+ )
+
+ open fun addTableImport(internalName: String, externalModuleName: String, externalBaseName: String)
+ open fun addMemoryImport(internalName: String, externalModuleName: String, externalBaseName: String)
+ open fun addGlobalImport(
+ internalName: String,
+ externalModuleName: String,
+ externalBaseName: String,
+ globalType: Type
+ )
+
+ open fun addEventImport(
+ internalName: String,
+ externalModuleName: String,
+ externalBaseName: String,
+ attribute: Number,
+ params: Type,
+ results: Type
+ )
+
+ open fun addFunctionExport(internalName: String, externalName: String): ExportRef
+ open fun addTableExport(internalName: String, externalName: String): ExportRef
+ open fun addMemoryExport(internalName: String, externalName: String): ExportRef
+ open fun addGlobalExport(internalName: String, externalName: String): ExportRef
+ open fun removeExport(externalName: String)
+ open fun getNumExports(): Number
+ open fun getExportByIndex(index: Number): ExportRef
+ open fun setFunctionTable(
+ initial: Number,
+ maximum: Number,
+ funcNames: Array,
+ offset: ExpressionRef = definedExternally
+ )
+
+ open fun getFunctionTable(): `T$26`
+ open fun setMemory(
+ initial: Number,
+ maximum: Number,
+ exportName: String? = definedExternally,
+ segments: Array? = definedExternally,
+ flags: Array? = definedExternally,
+ shared: Boolean = definedExternally
+ )
+
+ open fun getNumMemorySegments(): Number
+ open fun getMemorySegmentInfoByIndex(index: Number): MemorySegmentInfo
+ open fun setStart(start: FunctionRef)
+ open fun getFeatures(): Features
+ open fun setFeatures(features: Features)
+ open fun addCustomSection(name: String, contents: Uint8Array)
+ open fun emitText(): String
+ open fun emitStackIR(optimize: Boolean = definedExternally): String
+ open fun emitAsmjs(): String
+ open fun validate(): Number
+ open fun optimize()
+ open fun optimizeFunction(func: String)
+ open fun optimizeFunction(func: FunctionRef)
+ open fun runPasses(passes: Array)
+ open fun runPassesOnFunction(func: String, passes: Array)
+ open fun runPassesOnFunction(func: FunctionRef, passes: Array)
+ open fun autoDrop()
+ open fun dispose()
+ open fun emitBinary(): Uint8Array
+ open fun emitBinary(sourceMapUrl: String?): `T$27`
+ open fun interpret()
+ open fun addDebugInfoFileName(filename: String): Number
+ open fun getDebugInfoFileName(index: Number): String?
+ open fun setDebugLocation(
+ func: FunctionRef,
+ expr: ExpressionRef,
+ fileIndex: Number,
+ lineNumber: Number,
+ columnNumber: Number
+ )
+
+ open fun copyExpression(expr: ExpressionRef): ExpressionRef
+}
+
+internal external interface MemorySegment {
+ var offset: ExpressionRef
+ var data: Uint8Array
+ var passive: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+internal external interface TableElement {
+ var offset: ExpressionRef
+ var names: Array
+}
+
+internal external fun wrapModule(ptr: Number): Module
+
+internal external fun getExpressionId(expression: ExpressionRef): Number
+
+internal external fun getExpressionType(expression: ExpressionRef): Type
+
+internal external fun getExpressionInfo(expression: ExpressionRef): ExpressionInfo
+
+internal external interface MemorySegmentInfo {
+ var offset: ExpressionRef
+ var data: Uint8Array
+ var passive: Boolean
+}
+
+internal external interface ExpressionInfo {
+ var id: ExpressionIds
+ var type: Type
+}
+
+internal external interface BlockInfo : ExpressionInfo {
+ var name: String
+ var children: Array
+}
+
+internal external interface IfInfo : ExpressionInfo {
+ var condition: ExpressionRef
+ var ifTrue: ExpressionRef
+ var ifFalse: ExpressionRef
+}
+
+internal external interface LoopInfo : ExpressionInfo {
+ var name: String
+ var body: ExpressionRef
+}
+
+internal external interface BreakInfo : ExpressionInfo {
+ var name: String
+ var condition: ExpressionRef
+ var value: ExpressionRef
+}
+
+internal external interface SwitchInfo : ExpressionInfo {
+ var names: Array
+ var defaultName: String?
+ var condition: ExpressionRef
+ var value: ExpressionRef
+}
+
+internal external interface CallInfo : ExpressionInfo {
+ var isReturn: Boolean
+ var target: String
+ var operands: Array
+}
+
+internal external interface CallIndirectInfo : ExpressionInfo {
+ var isReturn: Boolean
+ var target: ExpressionRef
+ var operands: Array
+}
+
+internal external interface LocalGetInfo : ExpressionInfo {
+ var index: Number
+}
+
+internal external interface LocalSetInfo : ExpressionInfo {
+ var isTee: Boolean
+ var index: Number
+ var value: ExpressionRef
+}
+
+internal external interface GlobalGetInfo : ExpressionInfo {
+ var name: String
+}
+
+internal external interface GlobalSetInfo : ExpressionInfo {
+ var name: String
+ var value: ExpressionRef
+}
+
+internal external interface LoadInfo : ExpressionInfo {
+ var isAtomic: Boolean
+ var isSigned: Boolean
+ var offset: Number
+ var bytes: Number
+ var align: Number
+ var ptr: ExpressionRef
+}
+
+internal external interface StoreInfo : ExpressionInfo {
+ var isAtomic: Boolean
+ var offset: Number
+ var bytes: Number
+ var align: Number
+ var ptr: ExpressionRef
+ var value: ExpressionRef
+}
+
+internal external interface `T$28` {
+ var low: Number
+ var high: Number
+}
+
+internal external interface ConstInfo : ExpressionInfo {
+ var value: dynamic /* Number | `T$28` */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+internal external interface UnaryInfo : ExpressionInfo {
+ var op: Operations
+ var value: ExpressionRef
+}
+
+internal external interface BinaryInfo : ExpressionInfo {
+ var op: Operations
+ var left: ExpressionRef
+ var right: ExpressionRef
+}
+
+internal external interface SelectInfo : ExpressionInfo {
+ var ifTrue: ExpressionRef
+ var ifFalse: ExpressionRef
+ var condition: ExpressionRef
+}
+
+internal external interface DropInfo : ExpressionInfo {
+ var value: ExpressionRef
+}
+
+internal external interface ReturnInfo : ExpressionInfo {
+ var value: ExpressionRef
+}
+
+internal external interface NopInfo : ExpressionInfo
+
+internal external interface UnreachableInfo : ExpressionInfo
+
+internal external interface HostInfo : ExpressionInfo {
+ var op: Operations
+ var nameOperand: String?
+ var operands: Array
+}
+
+internal external interface AtomicRMWInfo : ExpressionInfo {
+ var op: Operations
+ var bytes: Number
+ var offset: Number
+ var ptr: ExpressionRef
+ var value: ExpressionRef
+}
+
+internal external interface AtomicCmpxchgInfo : ExpressionInfo {
+ var bytes: Number
+ var offset: Number
+ var ptr: ExpressionRef
+ var expected: ExpressionRef
+ var replacement: ExpressionRef
+}
+
+internal external interface AtomicWaitInfo : ExpressionInfo {
+ var ptr: ExpressionRef
+ var expected: ExpressionRef
+ var timeout: ExpressionRef
+ var expectedType: Type
+}
+
+internal external interface AtomicNotifyInfo : ExpressionInfo {
+ var ptr: ExpressionRef
+ var notifyCount: ExpressionRef
+}
+
+internal external interface AtomicFenceInfo : ExpressionInfo {
+ var order: Number
+}
+
+internal external interface SIMDExtractInfo : ExpressionInfo {
+ var op: Operations
+ var vec: ExpressionRef
+ var index: ExpressionRef
+}
+
+internal external interface SIMDReplaceInfo : ExpressionInfo {
+ var op: Operations
+ var vec: ExpressionRef
+ var index: ExpressionRef
+ var value: ExpressionRef
+}
+
+internal external interface SIMDShuffleInfo : ExpressionInfo {
+ var left: ExpressionRef
+ var right: ExpressionRef
+ var mask: Array
+}
+
+internal external interface SIMDTernaryInfo : ExpressionInfo {
+ var op: Operations
+ var a: ExpressionRef
+ var b: ExpressionRef
+ var c: ExpressionRef
+}
+
+internal external interface SIMDShiftInfo : ExpressionInfo {
+ var op: Operations
+ var vec: ExpressionRef
+ var shift: ExpressionRef
+}
+
+internal external interface SIMDLoadInfo : ExpressionInfo {
+ var op: Operations
+ var offset: Number
+ var align: Number
+ var ptr: ExpressionRef
+}
+
+internal external interface MemoryInitInfo : ExpressionInfo {
+ var segment: Number
+ var dest: ExpressionRef
+ var offset: ExpressionRef
+ var size: ExpressionRef
+}
+
+internal external interface MemoryDropInfo : ExpressionInfo {
+ var segment: Number
+}
+
+internal external interface MemoryCopyInfo : ExpressionInfo {
+ var dest: ExpressionRef
+ var source: ExpressionRef
+ var size: ExpressionRef
+}
+
+internal external interface MemoryFillInfo : ExpressionInfo {
+ var dest: ExpressionRef
+ var value: ExpressionRef
+ var size: ExpressionRef
+}
+
+internal external interface RefNullInfo : ExpressionInfo
+
+internal external interface RefIsNullInfo : ExpressionInfo {
+ var value: ExpressionRef
+}
+
+internal external interface RefFuncInfo : ExpressionInfo {
+ var func: String
+}
+
+internal external interface TryInfo : ExpressionInfo {
+ var body: ExpressionRef
+ var catchBody: ExpressionRef
+}
+
+internal external interface ThrowInfo : ExpressionInfo {
+ var event: String
+ var operands: Array
+}
+
+internal external interface RethrowInfo : ExpressionInfo {
+ var exnref: ExpressionRef
+}
+
+internal external interface BrOnExnInfo : ExpressionInfo {
+ var name: String
+ var event: String
+ var exnref: ExpressionRef
+}
+
+internal external interface PopInfo : ExpressionInfo
+
+internal external interface PushInfo : ExpressionInfo {
+ var value: ExpressionRef
+}
+
+internal external fun getFunctionInfo(func: FunctionRef): FunctionInfo
+
+internal external interface FunctionInfo {
+ var name: String
+ var module: String?
+ var base: String?
+ var params: Type
+ var results: Type
+ var vars: Array
+ var body: ExpressionRef
+}
+
+internal external fun getGlobalInfo(global: GlobalRef): GlobalInfo
+
+internal external interface GlobalInfo {
+ var name: String
+ var module: String?
+ var base: String?
+ var type: Type
+ var mutable: Boolean
+ var init: ExpressionRef
+}
+
+internal external fun getExportInfo(export_: ExportRef): ExportInfo
+
+internal external interface ExportInfo {
+ var kind: ExternalKinds
+ var name: String
+ var value: String
+}
+
+internal external fun getEventInfo(event: EventRef): EventInfo
+
+internal external interface EventInfo {
+ var name: String
+ var module: String?
+ var base: String?
+ var attribute: Number
+ var params: Type
+ var results: Type
+}
+
+internal external fun getSideEffects(expr: ExpressionRef, features: Features): SideEffects
+
+internal external enum class SideEffects {
+ None,
+ Branches,
+ Calls,
+ ReadsLocal,
+ WritesLocal,
+ ReadsGlobal,
+ WritesGlobal,
+ ReadsMemory,
+ WritesMemory,
+ ImplicitTrap,
+ IsAtomic,
+ Throws,
+ Any
+}
+
+internal external fun emitText(expression: ExpressionRef): String
+
+internal external fun emitText(expression: Module): String
+
+internal external fun readBinary(data: Uint8Array): Module
+
+internal external fun parseText(text: String): Module
+
+internal external fun getOptimizeLevel(): Number
+
+internal external fun setOptimizeLevel(level: Number): Number
+
+internal external fun getShrinkLevel(): Number
+
+internal external fun setShrinkLevel(level: Number): Number
+
+internal external fun getDebugInfo(): Boolean
+
+internal external fun setDebugInfo(on: Boolean)
+
+internal external fun getLowMemoryUnused(): Boolean
+
+internal external fun setLowMemoryUnused(on: Boolean)
+
+internal external fun getPassArgument(key: String): String?
+
+internal external fun setPassArgument(key: String, value: String?)
+
+internal external fun clearPassArguments()
+
+internal external fun getAlwaysInlineMaxSize(): Number
+
+internal external fun setAlwaysInlineMaxSize(size: Number)
+
+internal external fun getFlexibleInlineMaxSize(): Number
+
+internal external fun setFlexibleInlineMaxSize(size: Number)
+
+internal external fun getOneCallerInlineMaxSize(): Number
+
+internal external fun setOneCallerInlineMaxSize(size: Number)
+
+internal external fun exit(status: Number)
+
+internal open external class Relooper(module: Module) {
+ open fun addBlock(expression: ExpressionRef): RelooperBlockRef
+ open fun addBranch(from: RelooperBlockRef, to: RelooperBlockRef, condition: ExpressionRef, code: ExpressionRef)
+ open fun addBlockWithSwitch(code: ExpressionRef, condition: ExpressionRef): RelooperBlockRef
+ open fun addBranchForSwitch(
+ from: RelooperBlockRef,
+ to: RelooperBlockRef,
+ indexes: Array,
+ code: ExpressionRef
+ )
+
+ open fun renderAndDispose(entry: RelooperBlockRef, labelHelper: Number): ExpressionRef
+}
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.typealiases.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.typealiases.kt
new file mode 100644
index 000000000..523b13b40
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.typealiases.kt
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+@file:Suppress("PackageDirectoryMismatch", "NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING", "KDocMissingDocumentation")
+
+package space.kscience.kmath.internal.binaryen
+
+internal typealias Type = Number
+internal typealias ExpressionRef = Number
+internal typealias FunctionRef = Number
+internal typealias GlobalRef = Number
+internal typealias ExportRef = Number
+internal typealias EventRef = Number
+internal typealias RelooperBlockRef = Number
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/emitter/emitter.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/emitter/emitter.kt
similarity index 64%
rename from kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/emitter/emitter.kt
rename to kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/emitter/emitter.kt
index 3028656f5..1f7b09af8 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/emitter/emitter.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/emitter/emitter.kt
@@ -1,4 +1,9 @@
-package space.kscience.kmath.estree.internal.emitter
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.internal.emitter
internal open external class Emitter {
constructor(obj: Any)
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/estree/estree.extensions.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/estree/estree.extensions.kt
similarity index 90%
rename from kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/estree/estree.extensions.kt
rename to kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/estree/estree.extensions.kt
index 0e088c717..3aa31f921 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/estree/estree.extensions.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/estree/estree.extensions.kt
@@ -1,4 +1,9 @@
-package space.kscience.kmath.estree.internal.estree
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.internal.estree
internal fun Program(sourceType: String, vararg body: dynamic) = object : Program {
override var type = "Program"
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/estree/estree.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/estree/estree.kt
similarity index 99%
rename from kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/estree/estree.kt
rename to kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/estree/estree.kt
index 4dc1bfc10..e5254013e 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/estree/estree.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/estree/estree.kt
@@ -1,4 +1,9 @@
-package space.kscience.kmath.estree.internal.estree
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.internal.estree
import kotlin.js.RegExp
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/stream/stream.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/stream/stream.kt
new file mode 100644
index 000000000..52be5530f
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/stream/stream.kt
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.internal.stream
+
+import space.kscience.kmath.internal.emitter.Emitter
+
+internal open external class Stream : Emitter {
+ open fun pipe(dest: Any, options: Any): Any
+}
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/tsstdlib/lib.es2015.iterable.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/tsstdlib/lib.es2015.iterable.kt
similarity index 77%
rename from kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/tsstdlib/lib.es2015.iterable.kt
rename to kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/tsstdlib/lib.es2015.iterable.kt
index 7f2975219..9c012e3a3 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/tsstdlib/lib.es2015.iterable.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/tsstdlib/lib.es2015.iterable.kt
@@ -1,4 +1,9 @@
-package space.kscience.kmath.estree.internal.tsstdlib
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.internal.tsstdlib
internal external interface IteratorYieldResult {
var done: Boolean?
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/tsstdlib/lib.es5.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/tsstdlib/lib.es5.kt
similarity index 82%
rename from kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/tsstdlib/lib.es5.kt
rename to kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/tsstdlib/lib.es5.kt
index 7286b4a20..0cd395f2c 100644
--- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/internal/tsstdlib/lib.es5.kt
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/tsstdlib/lib.es5.kt
@@ -1,6 +1,11 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
@file:Suppress("UNUSED_TYPEALIAS_PARAMETER", "DEPRECATION")
-package space.kscience.kmath.estree.internal.tsstdlib
+package space.kscience.kmath.internal.tsstdlib
import kotlin.js.RegExp
@@ -33,6 +38,8 @@ internal external interface RegExpConstructor {
var lastMatch: String
}
+internal typealias Record = Any
+
internal external interface ConcatArray {
var length: Number
@@ -80,3 +87,10 @@ internal external interface ArrayLike {
}
internal typealias Extract = Any
+
+internal external interface PromiseLike {
+ fun then(
+ onfulfilled: ((value: T) -> Any?)? = definedExternally,
+ onrejected: ((reason: Any) -> Any?)? = definedExternally
+ ): PromiseLike
+}
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/webassembly/lib.dom.WebAssembly.module_dukat.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/webassembly/lib.dom.WebAssembly.module_dukat.kt
new file mode 100644
index 000000000..3754c3eff
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/webassembly/lib.dom.WebAssembly.module_dukat.kt
@@ -0,0 +1,236 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+@file:JsQualifier("WebAssembly")
+
+@file:Suppress(
+ "INTERFACE_WITH_SUPERCLASS",
+ "OVERRIDING_FINAL_MEMBER",
+ "RETURN_TYPE_MISMATCH_ON_OVERRIDE",
+ "NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING",
+ "ClassName",
+)
+
+package space.kscience.kmath.internal.webassembly
+
+import space.kscience.kmath.internal.tsstdlib.PromiseLike
+import org.khronos.webgl.ArrayBuffer
+import org.khronos.webgl.ArrayBufferView
+import org.khronos.webgl.Uint8Array
+import org.w3c.fetch.Response
+import kotlin.js.Promise
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+internal external interface CompileError {
+ companion object {
+ var prototype: CompileError
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+internal external interface Global {
+ var value: Any
+ fun valueOf(): Any
+
+ companion object {
+ var prototype: Global
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+@JsName("Instance")
+internal external interface Instance1 {
+ var exports: Exports
+
+ companion object {
+ var prototype: Instance
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+internal external interface LinkError {
+ companion object {
+ var prototype: LinkError
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+internal external interface Memory {
+ var buffer: ArrayBuffer
+ fun grow(delta: Number): Number
+
+ companion object {
+ var prototype: Memory
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+@JsName("Module")
+internal external interface Module1 {
+ companion object {
+ var prototype: Module
+ fun customSections(moduleObject: Module, sectionName: String): Array
+ fun exports(moduleObject: Module): Array
+ fun imports(moduleObject: Module): Array
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+internal external interface RuntimeError {
+ companion object {
+ var prototype: RuntimeError
+ }
+}
+
+@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
+internal external interface Table {
+ var length: Number
+ fun get(index: Number): Function<*>?
+ fun grow(delta: Number): Number
+ fun set(index: Number, value: Function<*>?)
+
+ companion object {
+ var prototype: Table
+ }
+}
+
+internal external interface GlobalDescriptor {
+ var mutable: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var value: String /* "f32" | "f64" | "i32" | "i64" */
+}
+
+internal external interface MemoryDescriptor {
+ var initial: Number
+ var maximum: Number?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+internal external interface ModuleExportDescriptor {
+ var kind: String /* "function" | "global" | "memory" | "table" */
+ var name: String
+}
+
+internal external interface ModuleImportDescriptor {
+ var kind: String /* "function" | "global" | "memory" | "table" */
+ var module: String
+ var name: String
+}
+
+internal external interface TableDescriptor {
+ var element: String /* "anyfunc" */
+ var initial: Number
+ var maximum: Number?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+internal external interface WebAssemblyInstantiatedSource {
+ var instance: Instance
+ var module: Module
+}
+
+internal external fun compile(bytes: ArrayBufferView): Promise
+
+internal external fun compile(bytes: ArrayBuffer): Promise
+
+internal external fun compileStreaming(source: Response): Promise
+
+internal external fun compileStreaming(source: Promise): Promise
+
+internal external fun instantiate(
+ bytes: ArrayBufferView,
+ importObject: Imports = definedExternally,
+): Promise
+
+internal external fun instantiate(bytes: ArrayBufferView): Promise
+
+internal external fun instantiate(
+ bytes: ArrayBuffer,
+ importObject: Imports = definedExternally,
+): dynamic /* Promise | Promise */
+
+internal external fun instantiate(bytes: ArrayBuffer): dynamic /* Promise | Promise */
+
+internal external fun instantiate(moduleObject: Module, importObject: Imports = definedExternally): Promise
+
+internal external fun instantiate(moduleObject: Module): Promise
+
+internal external fun instantiateStreaming(
+ response: Response,
+ importObject: Imports = definedExternally,
+): Promise
+
+internal external fun instantiateStreaming(response: Response): Promise
+
+internal external fun instantiateStreaming(
+ response: PromiseLike,
+ importObject: Imports = definedExternally,
+): Promise
+
+internal external fun instantiateStreaming(response: PromiseLike): Promise
+
+internal external fun validate(bytes: ArrayBufferView): Boolean
+
+internal external fun validate(bytes: ArrayBuffer): Boolean
+
+internal external interface `T$0` {
+ var name: String
+ var kind: String
+}
+
+internal external interface `T$1` {
+ var module: String
+ var name: String
+ var kind: String
+}
+
+internal open external class Module {
+ constructor(bufferSource: ArrayBuffer)
+ constructor(bufferSource: Uint8Array)
+
+ companion object {
+ fun customSections(module: Module, sectionName: String): Array
+ fun exports(module: Module): Array<`T$0`>
+ fun imports(module: Module): Array<`T$1`>
+ }
+}
+
+@JsName("Instance")
+internal open external class Instance(module: Module, importObject: Any = definedExternally) {
+ open var exports: Any
+}
+
+@JsName("Memory")
+internal open external class Memory1(memoryDescriptor: MemoryDescriptor) {
+ open var buffer: ArrayBuffer
+ open fun grow(numPages: Number): Number
+}
+
+@JsName("Table")
+internal open external class Table1(tableDescriptor: TableDescriptor) {
+ open var length: Number
+ open fun get(index: Number): Function<*>
+ open fun grow(numElements: Number): Number
+ open fun set(index: Number, value: Function<*>)
+}
+
+internal external fun compile(bufferSource: Uint8Array): Promise
+
+internal external interface ResultObject {
+ var module: Module
+ var instance: Instance
+}
+
+internal external fun instantiate(
+ bufferSource: Uint8Array,
+ importObject: Any = definedExternally,
+): Promise
+
+internal external fun instantiate(bufferSource: Uint8Array): Promise
+
+internal external fun validate(bufferSource: Uint8Array): Boolean
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/webassembly/nonDeclarations.WebAssembly.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/webassembly/nonDeclarations.WebAssembly.kt
new file mode 100644
index 000000000..59733299a
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/webassembly/nonDeclarations.WebAssembly.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+@file:Suppress("INTERFACE_WITH_SUPERCLASS",
+ "OVERRIDING_FINAL_MEMBER",
+ "RETURN_TYPE_MISMATCH_ON_OVERRIDE",
+ "CONFLICTING_OVERLOADS",
+ "NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING",
+)
+
+package space.kscience.kmath.internal.webassembly
+
+import space.kscience.kmath.internal.tsstdlib.Record
+
+internal typealias Exports = Record | Global | Memory | Table */>
+
+internal typealias ModuleImports = Record | Global | Memory | Table | Number */>
+
+internal typealias Imports = Record
+
+internal typealias CompileError1 = Error
+
+internal typealias LinkError1 = Error
+
+internal typealias RuntimeError1 = Error
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/internal/WasmBuilder.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/internal/WasmBuilder.kt
new file mode 100644
index 000000000..bd2b340a0
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/internal/WasmBuilder.kt
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm.internal
+
+import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.expressions.MST
+import space.kscience.kmath.expressions.MST.*
+import space.kscience.kmath.internal.binaryen.*
+import space.kscience.kmath.internal.webassembly.Instance
+import space.kscience.kmath.misc.StringSymbol
+import space.kscience.kmath.operations.*
+import space.kscience.kmath.internal.binaryen.Module as BinaryenModule
+import space.kscience.kmath.internal.webassembly.Module as WasmModule
+
+private val spreader = eval("(obj, args) => obj(...args)")
+
+@Suppress("UnsafeCastFromDynamic")
+internal sealed class WasmBuilder(
+ val binaryenType: Type,
+ val algebra: Algebra,
+ val target: MST,
+) where T : Number {
+ val keys: MutableList = mutableListOf()
+ lateinit var ctx: BinaryenModule
+
+ open fun visitSymbolic(mst: MST.Symbolic): ExpressionRef {
+ try {
+ algebra.bindSymbol(mst.value)
+ } catch (ignored: Throwable) {
+ null
+ }?.let { return visitNumeric(Numeric(it)) }
+
+ var idx = keys.indexOf(mst.value)
+
+ if (idx == -1) {
+ keys += mst.value
+ idx = keys.lastIndex
+ }
+
+ return ctx.local.get(idx, binaryenType)
+ }
+
+ abstract fun visitNumeric(mst: Numeric): ExpressionRef
+
+ open fun visitUnary(mst: Unary): ExpressionRef =
+ error("Unary operation ${mst.operation} not defined in $this")
+
+ open fun visitBinary(mst: Binary): ExpressionRef =
+ error("Binary operation ${mst.operation} not defined in $this")
+
+ open fun createModule(): BinaryenModule = js("new \$module\$binaryen.Module()")
+
+ fun visit(mst: MST): ExpressionRef = when (mst) {
+ is Symbolic -> visitSymbolic(mst)
+ is Numeric -> visitNumeric(mst)
+
+ is Unary -> when {
+ algebra is NumericAlgebra && mst.value is Numeric -> visitNumeric(
+ Numeric(algebra.unaryOperationFunction(mst.operation)(algebra.number((mst.value as Numeric).value))))
+
+ else -> visitUnary(mst)
+ }
+
+ is Binary -> when {
+ algebra is NumericAlgebra && mst.left is Numeric && mst.right is Numeric -> visitNumeric(Numeric(
+ algebra.binaryOperationFunction(mst.operation)
+ .invoke(algebra.number((mst.left as Numeric).value), algebra.number((mst.right as Numeric).value))
+ ))
+
+ else -> visitBinary(mst)
+ }
+ }
+
+ val instance by lazy {
+ val c = WasmModule(with(createModule()) {
+ ctx = this
+ val expr = visit(target)
+
+ addFunction(
+ "executable",
+ createType(Array(keys.size) { binaryenType }),
+ binaryenType,
+ arrayOf(),
+ expr
+ )
+
+ setOptimizeLevel(3)
+ optimizeFunction("executable")
+ addFunctionExport("executable", "executable")
+ val res = emitBinary()
+ dispose()
+ res
+ })
+
+ val i = Instance(c, js("{}") as Any)
+ val symbols = keys.map(::StringSymbol)
+ keys.clear()
+
+ Expression { args ->
+ val params = symbols.map(args::getValue).toTypedArray()
+ spreader(i.exports.asDynamic().executable, params) as T
+ }
+ }
+}
+
+internal class DoubleWasmBuilder(target: MST) : WasmBuilder(f64, DoubleField, target) {
+ override fun createModule(): BinaryenModule = readBinary(f64StandardFunctions)
+
+ override fun visitNumeric(mst: Numeric): ExpressionRef = ctx.f64.const(mst.value)
+
+ override fun visitUnary(mst: Unary): ExpressionRef = when (mst.operation) {
+ GroupOperations.MINUS_OPERATION -> ctx.f64.neg(visit(mst.value))
+ GroupOperations.PLUS_OPERATION -> visit(mst.value)
+ PowerOperations.SQRT_OPERATION -> ctx.f64.sqrt(visit(mst.value))
+ TrigonometricOperations.SIN_OPERATION -> ctx.call("sin", arrayOf(visit(mst.value)), f64)
+ TrigonometricOperations.COS_OPERATION -> ctx.call("cos", arrayOf(visit(mst.value)), f64)
+ TrigonometricOperations.TAN_OPERATION -> ctx.call("tan", arrayOf(visit(mst.value)), f64)
+ TrigonometricOperations.ASIN_OPERATION -> ctx.call("asin", arrayOf(visit(mst.value)), f64)
+ TrigonometricOperations.ACOS_OPERATION -> ctx.call("acos", arrayOf(visit(mst.value)), f64)
+ TrigonometricOperations.ATAN_OPERATION -> ctx.call("atan", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.SINH_OPERATION -> ctx.call("sinh", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.COSH_OPERATION -> ctx.call("cosh", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.TANH_OPERATION -> ctx.call("tanh", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.ASINH_OPERATION -> ctx.call("asinh", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.ACOSH_OPERATION -> ctx.call("acosh", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.ATANH_OPERATION -> ctx.call("atanh", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.EXP_OPERATION -> ctx.call("exp", arrayOf(visit(mst.value)), f64)
+ ExponentialOperations.LN_OPERATION -> ctx.call("log", arrayOf(visit(mst.value)), f64)
+ else -> super.visitUnary(mst)
+ }
+
+ override fun visitBinary(mst: Binary): ExpressionRef = when (mst.operation) {
+ GroupOperations.PLUS_OPERATION -> ctx.f64.add(visit(mst.left), visit(mst.right))
+ GroupOperations.MINUS_OPERATION -> ctx.f64.sub(visit(mst.left), visit(mst.right))
+ RingOperations.TIMES_OPERATION -> ctx.f64.mul(visit(mst.left), visit(mst.right))
+ FieldOperations.DIV_OPERATION -> ctx.f64.div(visit(mst.left), visit(mst.right))
+ PowerOperations.POW_OPERATION -> ctx.call("pow", arrayOf(visit(mst.left), visit(mst.right)), f64)
+ else -> super.visitBinary(mst)
+ }
+}
+
+internal class IntWasmBuilder(target: MST) : WasmBuilder(i32, IntRing, target) {
+ override fun visitNumeric(mst: Numeric): ExpressionRef = ctx.i32.const(mst.value)
+
+ override fun visitUnary(mst: Unary): ExpressionRef = when (mst.operation) {
+ GroupOperations.MINUS_OPERATION -> ctx.i32.sub(ctx.i32.const(0), visit(mst.value))
+ GroupOperations.PLUS_OPERATION -> visit(mst.value)
+ else -> super.visitUnary(mst)
+ }
+
+ override fun visitBinary(mst: Binary): ExpressionRef = when (mst.operation) {
+ GroupOperations.PLUS_OPERATION -> ctx.i32.add(visit(mst.left), visit(mst.right))
+ GroupOperations.MINUS_OPERATION -> ctx.i32.sub(visit(mst.left), visit(mst.right))
+ RingOperations.TIMES_OPERATION -> ctx.i32.mul(visit(mst.left), visit(mst.right))
+ else -> super.visitBinary(mst)
+ }
+}
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/internal/f64StandardFunctions.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/internal/f64StandardFunctions.kt
new file mode 100644
index 000000000..21a88b5d0
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/internal/f64StandardFunctions.kt
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm.internal
+
+import space.kscience.kmath.internal.base64.toUint8Array
+
+internal val f64StandardFunctions by lazy { toUint8Array(B) }
+
+private const val B =
+ "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"
diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/wasm.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/wasm.kt
new file mode 100644
index 000000000..d44c4e49d
--- /dev/null
+++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/wasm/wasm.kt
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm
+
+import space.kscience.kmath.estree.compileWith
+import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.expressions.MST
+import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.Symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.IntRing
+import space.kscience.kmath.wasm.internal.DoubleWasmBuilder
+import space.kscience.kmath.wasm.internal.IntWasmBuilder
+
+/**
+ * Compiles an [MST] to WASM in the context of reals.
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun DoubleField.expression(mst: MST): Expression =
+ DoubleWasmBuilder(mst).instance
+
+/**
+ * Compiles an [MST] to WASM in the context of integers.
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun IntRing.expression(mst: MST): Expression =
+ IntWasmBuilder(mst).instance
+
+/**
+ * Create a compiled expression with given [MST] and given [algebra].
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun MST.compileToExpression(algebra: IntRing): Expression = compileWith(algebra)
+
+
+/**
+ * Compile given MST to expression and evaluate it against [arguments].
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun MST.compile(algebra: IntRing, arguments: Map): Int =
+ compileToExpression(algebra).invoke(arguments)
+
+
+/**
+ * Compile given MST to expression and evaluate it against [arguments].
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun MST.compile(algebra: IntRing, vararg arguments: Pair): Int =
+ compileToExpression(algebra)(*arguments)
+
+/**
+ * Create a compiled expression with given [MST] and given [algebra].
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun MST.compileToExpression(algebra: DoubleField): Expression = compileWith(algebra)
+
+
+/**
+ * Compile given MST to expression and evaluate it against [arguments].
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun MST.compile(algebra: DoubleField, arguments: Map): Double =
+ compileToExpression(algebra).invoke(arguments)
+
+
+/**
+ * Compile given MST to expression and evaluate it against [arguments].
+ *
+ * @author Iaroslav Postovalov
+ */
+public fun MST.compile(algebra: DoubleField, vararg arguments: Pair): Double =
+ compileToExpression(algebra).invoke(*arguments)
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/TestExecutionTime.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/TestExecutionTime.kt
new file mode 100644
index 000000000..01746ddb6
--- /dev/null
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/TestExecutionTime.kt
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.ast
+
+import space.kscience.kmath.expressions.*
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.ExtendedField
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.math.sin
+import kotlin.random.Random
+import kotlin.test.Test
+import kotlin.time.measureTime
+import space.kscience.kmath.estree.compileToExpression as estreeCompileToExpression
+import space.kscience.kmath.wasm.compileToExpression as wasmCompileToExpression
+
+internal class TestExecutionTime {
+ private companion object {
+ private const val times = 1_000_000
+ private val x by symbol
+ private val algebra: ExtendedField = DoubleField
+
+ private val functional = DoubleField.expressionInExtendedField {
+ bindSymbol(x) * const(2.0) + const(2.0) / bindSymbol(x) - const(16.0) / sin(bindSymbol(x))
+ }
+
+ private val node = MstExtendedField {
+ bindSymbol(x) * number(2.0) + number(2.0) / bindSymbol(x) - number(16.0) / sin(bindSymbol(x))
+ }
+
+ private val mst = node.toExpression(DoubleField)
+ private val wasm = node.wasmCompileToExpression(DoubleField)
+ private val estree = node.estreeCompileToExpression(DoubleField)
+
+ // In JavaScript, the expression below is implemented like
+ // _no_name_provided__125.prototype.invoke_178 = function (args) {
+ // var tmp = getValue(args, raw$_get_x__3(this._$x$delegate_2)) * 2.0 + 2.0 / getValue(args, raw$_get_x__3(this._$x$delegate_2));
+ // var tmp0_sin_0_5 = getValue(args, raw$_get_x__3(this._$x$delegate_2));
+ // return tmp - 16.0 / Math.sin(tmp0_sin_0_5);
+ // };
+
+ private val raw = Expression { args ->
+ args.getValue(x) * 2.0 + 2.0 / args.getValue(x) - 16.0 / sin(args.getValue(x))
+ }
+ }
+
+ private fun invokeAndSum(name: String, expr: Expression) {
+ println(name)
+ val rng = Random(0)
+ var sum = 0.0
+ measureTime { repeat(times) { sum += expr(x to rng.nextDouble()) } }.also(::println)
+ }
+
+ @Test
+ fun functionalExpression() = invokeAndSum("functional", functional)
+
+ @Test
+ fun mstExpression() = invokeAndSum("mst", mst)
+
+ @Test
+ fun wasmExpression() = invokeAndSum("wasm", wasm)
+
+ @Test
+ fun estreeExpression() = invokeAndSum("estree", wasm)
+
+ @Test
+ fun rawExpression() = invokeAndSum("raw", raw)
+}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeConsistencyWithInterpreter.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeConsistencyWithInterpreter.kt
index fb8d73c0c..d80318db8 100644
--- a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeConsistencyWithInterpreter.kt
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeConsistencyWithInterpreter.kt
@@ -1,20 +1,24 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree
-import space.kscience.kmath.ast.*
import space.kscience.kmath.complex.ComplexField
import space.kscience.kmath.complex.toComplex
-import space.kscience.kmath.misc.Symbol
+import space.kscience.kmath.expressions.*
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.ByteRing
import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
internal class TestESTreeConsistencyWithInterpreter {
-
@Test
fun mstSpace() {
-
val mst = MstGroup {
binaryOperationFunction("+")(
unaryOperationFunction("+")(
@@ -25,12 +29,12 @@ internal class TestESTreeConsistencyWithInterpreter {
),
number(1)
- ) + bindSymbol("x") + zero
+ ) + bindSymbol(x) + zero
}
assertEquals(
- mst.interpret(MstGroup, Symbol.x to MST.Numeric(2)),
- mst.compile(MstGroup, Symbol.x to MST.Numeric(2))
+ mst.interpret(MstGroup, x to MST.Numeric(2)),
+ mst.compile(MstGroup, x to MST.Numeric(2))
)
}
@@ -39,7 +43,7 @@ internal class TestESTreeConsistencyWithInterpreter {
val mst = MstRing {
binaryOperationFunction("+")(
unaryOperationFunction("+")(
- (bindSymbol("x") - (2.toByte() + (scale(
+ (bindSymbol(x) - (2.toByte() + (scale(
add(number(1), number(1)),
2.0
) + 1.toByte()))) * 3.0 - 1.toByte()
@@ -50,24 +54,24 @@ internal class TestESTreeConsistencyWithInterpreter {
}
assertEquals(
- mst.interpret(ByteRing, Symbol.x to 3.toByte()),
- mst.compile(ByteRing, Symbol.x to 3.toByte())
+ mst.interpret(ByteRing, x to 3.toByte()),
+ mst.compile(ByteRing, x to 3.toByte())
)
}
@Test
- fun realField() {
+ fun doubleField() {
val mst = MstField {
+(3 - 2 + 2 * number(1) + 1.0) + binaryOperationFunction("+")(
- (3.0 - (bindSymbol("x") + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ (3.0 - (bindSymbol(x) + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ number(1),
number(1) / 2 + number(2.0) * one
) + zero
}
assertEquals(
- mst.interpret(DoubleField, Symbol.x to 2.0),
- mst.compile(DoubleField, Symbol.x to 2.0)
+ mst.interpret(DoubleField, x to 2.0),
+ mst.compile(DoubleField, x to 2.0)
)
}
@@ -75,15 +79,19 @@ internal class TestESTreeConsistencyWithInterpreter {
fun complexField() {
val mst = MstField {
+(3 - 2 + 2 * number(1) + 1.0) + binaryOperationFunction("+")(
- (3.0 - (bindSymbol("x") + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ (3.0 - (bindSymbol(x) + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ number(1),
number(1) / 2 + number(2.0) * one
) + zero
}
assertEquals(
- mst.interpret(ComplexField, Symbol.x to 2.0.toComplex()),
- mst.compile(ComplexField, Symbol.x to 2.0.toComplex())
+ mst.interpret(ComplexField, x to 2.0.toComplex()),
+ mst.compile(ComplexField, x to 2.0.toComplex()),
)
}
+
+ private companion object {
+ private val x by symbol
+ }
}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeOperationsSupport.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeOperationsSupport.kt
index 24c003e3e..a0b68a811 100644
--- a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeOperationsSupport.kt
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeOperationsSupport.kt
@@ -1,42 +1,42 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree
-import space.kscience.kmath.ast.MstExtendedField
+import space.kscience.kmath.expressions.MstField
+import space.kscience.kmath.expressions.MstGroup
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
-import kotlin.random.Random
import kotlin.test.Test
import kotlin.test.assertEquals
internal class TestESTreeOperationsSupport {
@Test
fun testUnaryOperationInvocation() {
- val expression = MstExtendedField { -bindSymbol("x") }.compileToExpression(DoubleField)
- val res = expression("x" to 2.0)
+ val expression = MstGroup { -bindSymbol(x) }.compileToExpression(DoubleField)
+ val res = expression(x to 2.0)
assertEquals(-2.0, res)
}
@Test
fun testBinaryOperationInvocation() {
- val expression = MstExtendedField { -bindSymbol("x") + number(1.0) }.compileToExpression(DoubleField)
- val res = expression("x" to 2.0)
+ val expression = MstGroup { -bindSymbol(x) + number(1.0) }.compileToExpression(DoubleField)
+ val res = expression(x to 2.0)
assertEquals(-1.0, res)
}
@Test
fun testConstProductInvocation() {
- val res = MstExtendedField { bindSymbol("x") * 2 }.compileToExpression(DoubleField)("x" to 2.0)
+ val res = MstField { bindSymbol(x) * 2 }.compileToExpression(DoubleField)(x to 2.0)
assertEquals(4.0, res)
}
- @Test
- fun testMultipleCalls() {
- val e =
- MstExtendedField { sin(bindSymbol("x")).pow(4) - 6 * bindSymbol("x") / tanh(bindSymbol("x")) }
- .compileToExpression(DoubleField)
- val r = Random(0)
- var s = 0.0
- repeat(1000000) { s += e("x" to r.nextDouble()) }
- println(s)
+ private companion object {
+ private val x by symbol
}
}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeSpecialization.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeSpecialization.kt
index c83fbc391..6756fd8c7 100644
--- a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeSpecialization.kt
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeSpecialization.kt
@@ -1,8 +1,15 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree
-import space.kscience.kmath.ast.MstExtendedField
+import space.kscience.kmath.expressions.MstExtendedField
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -10,55 +17,60 @@ import kotlin.test.assertEquals
internal class TestESTreeSpecialization {
@Test
fun testUnaryPlus() {
- val expr = MstExtendedField { unaryOperationFunction("+")(bindSymbol("x")) }.compileToExpression(DoubleField)
- assertEquals(2.0, expr("x" to 2.0))
+ val expr = MstExtendedField { unaryOperationFunction("+")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(2.0, expr(x to 2.0))
}
@Test
fun testUnaryMinus() {
- val expr = MstExtendedField { unaryOperationFunction("-")(bindSymbol("x")) }.compileToExpression(DoubleField)
- assertEquals(-2.0, expr("x" to 2.0))
+ val expr = MstExtendedField { unaryOperationFunction("-")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(-2.0, expr(x to 2.0))
}
@Test
fun testAdd() {
val expr = MstExtendedField {
- binaryOperationFunction("+")(bindSymbol("x"),
- bindSymbol("x"))
+ binaryOperationFunction("+")(
+ bindSymbol(x),
+ bindSymbol(x),
+ )
}.compileToExpression(DoubleField)
- assertEquals(4.0, expr("x" to 2.0))
+ assertEquals(4.0, expr(x to 2.0))
}
@Test
fun testSine() {
- val expr = MstExtendedField { unaryOperationFunction("sin")(bindSymbol("x")) }.compileToExpression(DoubleField)
- assertEquals(0.0, expr("x" to 0.0))
+ val expr = MstExtendedField { unaryOperationFunction("sin")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(0.0, expr(x to 0.0))
}
@Test
- fun testMinus() {
+ fun testSubtract() {
val expr = MstExtendedField {
- binaryOperationFunction("-")(bindSymbol("x"),
- bindSymbol("x"))
+ binaryOperationFunction("-")(bindSymbol(x),
+ bindSymbol(x))
}.compileToExpression(DoubleField)
- assertEquals(0.0, expr("x" to 2.0))
+ assertEquals(0.0, expr(x to 2.0))
}
@Test
fun testDivide() {
val expr = MstExtendedField {
- binaryOperationFunction("/")(bindSymbol("x"),
- bindSymbol("x"))
+ binaryOperationFunction("/")(bindSymbol(x), bindSymbol(x))
}.compileToExpression(DoubleField)
- assertEquals(1.0, expr("x" to 2.0))
+ assertEquals(1.0, expr(x to 2.0))
}
@Test
fun testPower() {
val expr = MstExtendedField {
- binaryOperationFunction("pow")(bindSymbol("x"), number(2))
+ binaryOperationFunction("pow")(bindSymbol(x), number(2))
}.compileToExpression(DoubleField)
- assertEquals(4.0, expr("x" to 2.0))
+ assertEquals(4.0, expr(x to 2.0))
+ }
+
+ private companion object {
+ private val x by symbol
}
}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeVariables.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeVariables.kt
index 0b1c1c33e..e1830d9df 100644
--- a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeVariables.kt
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/estree/TestESTreeVariables.kt
@@ -1,8 +1,15 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.estree
-import space.kscience.kmath.ast.MstRing
+import space.kscience.kmath.expressions.MstRing
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.ByteRing
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -11,13 +18,17 @@ import kotlin.test.assertFailsWith
internal class TestESTreeVariables {
@Test
fun testVariable() {
- val expr = MstRing{ bindSymbol("x") }.compileToExpression(ByteRing)
- assertEquals(1.toByte(), expr("x" to 1.toByte()))
+ val expr = MstRing { bindSymbol(x) }.compileToExpression(ByteRing)
+ assertEquals(1.toByte(), expr(x to 1.toByte()))
}
@Test
fun testUndefinedVariableFails() {
- val expr = MstRing { bindSymbol("x") }.compileToExpression(ByteRing)
+ val expr = MstRing { bindSymbol(x) }.compileToExpression(ByteRing)
assertFailsWith { expr() }
}
+
+ private companion object {
+ private val x by symbol
+ }
}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmConsistencyWithInterpreter.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmConsistencyWithInterpreter.kt
new file mode 100644
index 000000000..f3e0726d6
--- /dev/null
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmConsistencyWithInterpreter.kt
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm
+
+import space.kscience.kmath.expressions.MstField
+import space.kscience.kmath.expressions.MstRing
+import space.kscience.kmath.expressions.interpret
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.IntRing
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.test.Test
+import kotlin.test.assertEquals
+
+internal class TestWasmConsistencyWithInterpreter {
+ @Test
+ fun intRing() {
+ val mst = MstRing {
+ binaryOperationFunction("+")(
+ unaryOperationFunction("+")(
+ (bindSymbol(x) - (2.toByte() + (scale(
+ add(number(1), number(1)),
+ 2.0
+ ) + 1.toByte()))) * 3.0 - 1.toByte()
+ ),
+
+ number(1)
+ ) * number(2)
+ }
+
+ assertEquals(
+ mst.interpret(IntRing, x to 3),
+ mst.compile(IntRing, x to 3)
+ )
+ }
+
+ @Test
+ fun doubleField() {
+ val mst = MstField {
+ +(3 - 2 + 2 * number(1) + 1.0) + binaryOperationFunction("+")(
+ (3.0 - (bindSymbol(x) + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ + number(1),
+ number(1) / 2 + number(2.0) * one
+ ) + zero
+ }
+
+ assertEquals(
+ mst.interpret(DoubleField, x to 2.0),
+ mst.compile(DoubleField, x to 2.0)
+ )
+ }
+
+ private companion object {
+ private val x by symbol
+ }
+}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmOperationsSupport.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmOperationsSupport.kt
new file mode 100644
index 000000000..2946592f4
--- /dev/null
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmOperationsSupport.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm
+
+import space.kscience.kmath.expressions.MstField
+import space.kscience.kmath.expressions.MstGroup
+import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.test.Test
+import kotlin.test.assertEquals
+
+internal class TestWasmOperationsSupport {
+ @Test
+ fun testUnaryOperationInvocation() {
+ val expression = MstGroup { -bindSymbol(x) }.compileToExpression(DoubleField)
+ val res = expression(x to 2.0)
+ assertEquals(-2.0, res)
+ }
+
+ @Test
+ fun testBinaryOperationInvocation() {
+ val expression = MstGroup { -bindSymbol(x) + number(1.0) }.compileToExpression(DoubleField)
+ val res = expression(x to 2.0)
+ assertEquals(-1.0, res)
+ }
+
+ @Test
+ fun testConstProductInvocation() {
+ val res = MstField { bindSymbol(x) * 2 }.compileToExpression(DoubleField)(x to 2.0)
+ assertEquals(4.0, res)
+ }
+
+ private companion object {
+ private val x by symbol
+ }
+}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecialization.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecialization.kt
new file mode 100644
index 000000000..e1f7b603a
--- /dev/null
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecialization.kt
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm
+
+import space.kscience.kmath.expressions.MstExtendedField
+import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.test.Test
+import kotlin.test.assertEquals
+
+internal class TestWasmSpecialization {
+ @Test
+ fun testUnaryPlus() {
+ val expr = MstExtendedField { unaryOperationFunction("+")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(2.0, expr(x to 2.0))
+ }
+
+ @Test
+ fun testUnaryMinus() {
+ val expr = MstExtendedField { unaryOperationFunction("-")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(-2.0, expr(x to 2.0))
+ }
+
+ @Test
+ fun testAdd() {
+ val expr = MstExtendedField {
+ binaryOperationFunction("+")(
+ bindSymbol(x),
+ bindSymbol(x),
+ )
+ }.compileToExpression(DoubleField)
+ assertEquals(4.0, expr(x to 2.0))
+ }
+
+ @Test
+ fun testSine() {
+ val expr = MstExtendedField { unaryOperationFunction("sin")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(0.0, expr(x to 0.0))
+ }
+
+ @Test
+ fun testSubtract() {
+ val expr = MstExtendedField {
+ binaryOperationFunction("-")(bindSymbol(x),
+ bindSymbol(x))
+ }.compileToExpression(DoubleField)
+ assertEquals(0.0, expr(x to 2.0))
+ }
+
+ @Test
+ fun testDivide() {
+ val expr = MstExtendedField {
+ binaryOperationFunction("/")(bindSymbol(x), bindSymbol(x))
+ }.compileToExpression(DoubleField)
+ assertEquals(1.0, expr(x to 2.0))
+ }
+
+ @Test
+ fun testPower() {
+ val expr = MstExtendedField {
+ binaryOperationFunction("pow")(bindSymbol(x), number(2))
+ }.compileToExpression(DoubleField)
+
+ assertEquals(4.0, expr(x to 2.0))
+ }
+
+ private companion object {
+ private val x by symbol
+ }
+}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt
new file mode 100644
index 000000000..dd5452d04
--- /dev/null
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm
+
+import space.kscience.kmath.expressions.MstExtendedField
+import space.kscience.kmath.expressions.MstRing
+import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.IntRing
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.test.Test
+import kotlin.test.assertEquals
+
+internal class TestWasmSpecific {
+ @Test
+ fun int() {
+ val res = MstRing { number(100000000) + number(10000000) }.compile(IntRing)
+ assertEquals(110000000, res)
+ }
+
+ @Test
+ fun real() {
+ val res = MstExtendedField { number(100000000) + number(2).pow(10) }.compile(DoubleField)
+ assertEquals(100001024.0, res)
+ }
+
+ @Test
+ fun argsPassing() {
+ val res = MstExtendedField { bindSymbol(y) + bindSymbol(x).pow(10) }.compile(
+ DoubleField,
+ x to 2.0,
+ y to 100000000.0,
+ )
+
+ assertEquals(100001024.0, res)
+ }
+
+ @Test
+ fun powFunction() {
+ val expr = MstExtendedField { bindSymbol(x).pow(1.0 / 6.0) }.compileToExpression(DoubleField)
+ assertEquals(0.9730585187140817, expr(x to 0.8488554755054833))
+ }
+
+ private companion object {
+ private val x by symbol
+ private val y by symbol
+ }
+}
diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmVariables.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmVariables.kt
new file mode 100644
index 000000000..406ba8c8d
--- /dev/null
+++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmVariables.kt
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.wasm
+
+import space.kscience.kmath.expressions.MstRing
+import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
+import space.kscience.kmath.operations.IntRing
+import space.kscience.kmath.operations.bindSymbol
+import space.kscience.kmath.operations.invoke
+import kotlin.test.Test
+import kotlin.test.assertEquals
+import kotlin.test.assertFailsWith
+
+internal class TestWasmVariables {
+ @Test
+ fun testVariable() {
+ val expr = MstRing { bindSymbol(x) }.compileToExpression(IntRing)
+ assertEquals(1, expr(x to 1))
+ }
+
+ @Test
+ fun testUndefinedVariableFails() {
+ val expr = MstRing { bindSymbol(x) }.compileToExpression(IntRing)
+ assertFailsWith { expr() }
+ }
+
+ private companion object {
+ private val x by symbol
+ }
+}
diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt
index ee2b6fb54..dbce893d1 100644
--- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt
+++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt
@@ -1,10 +1,15 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm
import space.kscience.kmath.asm.internal.AsmBuilder
import space.kscience.kmath.asm.internal.buildName
-import space.kscience.kmath.ast.MST
-import space.kscience.kmath.ast.MST.*
import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.expressions.MST
+import space.kscience.kmath.expressions.MST.*
import space.kscience.kmath.expressions.invoke
import space.kscience.kmath.misc.Symbol
import space.kscience.kmath.operations.Algebra
@@ -34,15 +39,17 @@ internal fun MST.compileWith(type: Class, algebra: Algebra): Exp
is Unary -> when {
algebra is NumericAlgebra && node.value is Numeric -> loadObjectConstant(
- algebra.unaryOperationFunction(node.operation)(algebra.number(node.value.value)))
+ algebra.unaryOperationFunction(node.operation)(algebra.number((node.value as Numeric).value)))
else -> buildCall(algebra.unaryOperationFunction(node.operation)) { visit(node.value) }
}
is Binary -> when {
algebra is NumericAlgebra && node.left is Numeric && node.right is Numeric -> loadObjectConstant(
- algebra.binaryOperationFunction(node.operation)
- .invoke(algebra.number(node.left.value), algebra.number(node.right.value))
+ algebra.binaryOperationFunction(node.operation).invoke(
+ algebra.number((node.left as Numeric).value),
+ algebra.number((node.right as Numeric).value)
+ )
)
algebra is NumericAlgebra && node.left is Numeric -> buildCall(
@@ -71,18 +78,18 @@ internal fun MST.compileWith(type: Class, algebra: Algebra): Exp
/**
* Create a compiled expression with given [MST] and given [algebra].
*/
-public inline fun MST.compileToExpression(algebra: Algebra): Expression =
+public inline fun MST.compileToExpression(algebra: Algebra): Expression =
compileWith(T::class.java, algebra)
/**
* Compile given MST to expression and evaluate it against [arguments]
*/
-public inline fun MST.compile(algebra: Algebra, arguments: Map): T =
+public inline fun MST.compile(algebra: Algebra, arguments: Map): T =
compileToExpression(algebra).invoke(arguments)
/**
* Compile given MST to expression and evaluate it against [arguments]
*/
-public inline fun MST.compile(algebra: Algebra, vararg arguments: Pair): T =
+public inline fun MST.compile(algebra: Algebra, vararg arguments: Pair): T =
compileToExpression(algebra).invoke(*arguments)
diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt
index a03af5bf9..bdd8f52b6 100644
--- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt
+++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm.internal
import org.objectweb.asm.*
@@ -5,8 +10,8 @@ import org.objectweb.asm.Opcodes.*
import org.objectweb.asm.Type.*
import org.objectweb.asm.commons.InstructionAdapter
import space.kscience.kmath.asm.internal.AsmBuilder.ClassLoader
-import space.kscience.kmath.ast.MST
import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.expressions.MST
import java.lang.invoke.MethodHandles
import java.lang.invoke.MethodType
import java.util.stream.Collectors.toMap
diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/codegenUtils.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/codegenUtils.kt
index 4522c966f..560780f99 100644
--- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/codegenUtils.kt
+++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/codegenUtils.kt
@@ -1,9 +1,14 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm.internal
import org.objectweb.asm.*
import org.objectweb.asm.commons.InstructionAdapter
-import space.kscience.kmath.ast.MST
import space.kscience.kmath.expressions.Expression
+import space.kscience.kmath.expressions.MST
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/mapIntrinsics.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/mapIntrinsics.kt
index 0a0c21d8a..dc8f19fb6 100644
--- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/mapIntrinsics.kt
+++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/mapIntrinsics.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
@file:JvmName("MapIntrinsics")
package space.kscience.kmath.asm.internal
diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt
new file mode 100644
index 000000000..556adbe7d
--- /dev/null
+++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/rendering/multiplatformToString.kt
@@ -0,0 +1,9 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.ast.rendering
+
+internal actual fun Double.multiplatformToString(): String = toString()
+internal actual fun Float.multiplatformToString(): String = toString()
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmConsistencyWithInterpreter.kt b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmConsistencyWithInterpreter.kt
index 096bf4447..f94d36602 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmConsistencyWithInterpreter.kt
+++ b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmConsistencyWithInterpreter.kt
@@ -1,20 +1,24 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm
-import space.kscience.kmath.ast.*
import space.kscience.kmath.complex.ComplexField
import space.kscience.kmath.complex.toComplex
-import space.kscience.kmath.misc.Symbol.Companion.x
+import space.kscience.kmath.expressions.*
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.ByteRing
import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
internal class TestAsmConsistencyWithInterpreter {
-
@Test
fun mstSpace() {
-
val mst = MstGroup {
binaryOperationFunction("+")(
unaryOperationFunction("+")(
@@ -25,7 +29,7 @@ internal class TestAsmConsistencyWithInterpreter {
),
number(1)
- ) + bindSymbol("x") + zero
+ ) + bindSymbol(x) + zero
}
assertEquals(
@@ -39,7 +43,7 @@ internal class TestAsmConsistencyWithInterpreter {
val mst = MstRing {
binaryOperationFunction("+")(
unaryOperationFunction("+")(
- (bindSymbol("x") - (2.toByte() + (scale(
+ (bindSymbol(x) - (2.toByte() + (scale(
add(number(1), number(1)),
2.0
) + 1.toByte()))) * 3.0 - 1.toByte()
@@ -56,10 +60,10 @@ internal class TestAsmConsistencyWithInterpreter {
}
@Test
- fun realField() {
+ fun doubleField() {
val mst = MstField {
+(3 - 2 + 2 * number(1) + 1.0) + binaryOperationFunction("+")(
- (3.0 - (bindSymbol("x") + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ (3.0 - (bindSymbol(x) + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ number(1),
number(1) / 2 + number(2.0) * one
) + zero
@@ -75,7 +79,7 @@ internal class TestAsmConsistencyWithInterpreter {
fun complexField() {
val mst = MstField {
+(3 - 2 + 2 * number(1) + 1.0) + binaryOperationFunction("+")(
- (3.0 - (bindSymbol("x") + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ (3.0 - (bindSymbol(x) + (scale(add(number(1.0), number(1.0)), 2.0) + 1.0))) * 3 - 1.0
+ number(1),
number(1) / 2 + number(2.0) * one
) + zero
@@ -86,4 +90,8 @@ internal class TestAsmConsistencyWithInterpreter {
mst.compile(ComplexField, x to 2.0.toComplex())
)
}
+
+ private companion object {
+ private val x by symbol
+ }
}
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmOperationsSupport.kt b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmOperationsSupport.kt
index d1a216ede..147639f7c 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmOperationsSupport.kt
+++ b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmOperationsSupport.kt
@@ -1,44 +1,42 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm
-import space.kscience.kmath.ast.MstExtendedField
-import space.kscience.kmath.ast.MstField
-import space.kscience.kmath.ast.MstGroup
+import space.kscience.kmath.expressions.MstField
+import space.kscience.kmath.expressions.MstGroup
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
-import kotlin.random.Random
import kotlin.test.Test
import kotlin.test.assertEquals
internal class TestAsmOperationsSupport {
@Test
fun testUnaryOperationInvocation() {
- val expression = MstGroup { -bindSymbol("x") }.compileToExpression(DoubleField)
- val res = expression("x" to 2.0)
+ val expression = MstGroup { -bindSymbol(x) }.compileToExpression(DoubleField)
+ val res = expression(x to 2.0)
assertEquals(-2.0, res)
}
@Test
fun testBinaryOperationInvocation() {
- val expression = MstGroup { -bindSymbol("x") + number(1.0) }.compileToExpression(DoubleField)
- val res = expression("x" to 2.0)
+ val expression = MstGroup { -bindSymbol(x) + number(1.0) }.compileToExpression(DoubleField)
+ val res = expression(x to 2.0)
assertEquals(-1.0, res)
}
@Test
fun testConstProductInvocation() {
- val res = MstField { bindSymbol("x") * 2 }.compileToExpression(DoubleField)("x" to 2.0)
+ val res = MstField { bindSymbol(x) * 2 }.compileToExpression(DoubleField)(x to 2.0)
assertEquals(4.0, res)
}
- @Test
- fun testMultipleCalls() {
- val e =
- MstExtendedField { sin(bindSymbol("x")).pow(4) - 6 * bindSymbol("x") / tanh(bindSymbol("x")) }
- .compileToExpression(DoubleField)
- val r = Random(0)
- var s = 0.0
- repeat(1000000) { s += e("x" to r.nextDouble()) }
- println(s)
+ private companion object {
+ private val x by symbol
}
}
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmSpecialization.kt b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmSpecialization.kt
index 75a3ffaee..3a681e482 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmSpecialization.kt
+++ b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmSpecialization.kt
@@ -1,8 +1,15 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm
-import space.kscience.kmath.ast.MstExtendedField
+import space.kscience.kmath.expressions.MstExtendedField
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.DoubleField
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -10,55 +17,60 @@ import kotlin.test.assertEquals
internal class TestAsmSpecialization {
@Test
fun testUnaryPlus() {
- val expr = MstExtendedField { unaryOperationFunction("+")(bindSymbol("x")) }.compileToExpression(DoubleField)
- assertEquals(2.0, expr("x" to 2.0))
+ val expr = MstExtendedField { unaryOperationFunction("+")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(2.0, expr(x to 2.0))
}
@Test
fun testUnaryMinus() {
- val expr = MstExtendedField { unaryOperationFunction("-")(bindSymbol("x")) }.compileToExpression(DoubleField)
- assertEquals(-2.0, expr("x" to 2.0))
+ val expr = MstExtendedField { unaryOperationFunction("-")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(-2.0, expr(x to 2.0))
}
@Test
fun testAdd() {
val expr = MstExtendedField {
- binaryOperationFunction("+")(bindSymbol("x"),
- bindSymbol("x"))
+ binaryOperationFunction("+")(
+ bindSymbol(x),
+ bindSymbol(x),
+ )
}.compileToExpression(DoubleField)
- assertEquals(4.0, expr("x" to 2.0))
+ assertEquals(4.0, expr(x to 2.0))
}
@Test
fun testSine() {
- val expr = MstExtendedField { unaryOperationFunction("sin")(bindSymbol("x")) }.compileToExpression(DoubleField)
- assertEquals(0.0, expr("x" to 0.0))
+ val expr = MstExtendedField { unaryOperationFunction("sin")(bindSymbol(x)) }.compileToExpression(DoubleField)
+ assertEquals(0.0, expr(x to 0.0))
}
@Test
- fun testMinus() {
+ fun testSubtract() {
val expr = MstExtendedField {
- binaryOperationFunction("-")(bindSymbol("x"),
- bindSymbol("x"))
+ binaryOperationFunction("-")(bindSymbol(x),
+ bindSymbol(x))
}.compileToExpression(DoubleField)
- assertEquals(0.0, expr("x" to 2.0))
+ assertEquals(0.0, expr(x to 2.0))
}
@Test
fun testDivide() {
val expr = MstExtendedField {
- binaryOperationFunction("/")(bindSymbol("x"),
- bindSymbol("x"))
+ binaryOperationFunction("/")(bindSymbol(x), bindSymbol(x))
}.compileToExpression(DoubleField)
- assertEquals(1.0, expr("x" to 2.0))
+ assertEquals(1.0, expr(x to 2.0))
}
@Test
fun testPower() {
val expr = MstExtendedField {
- binaryOperationFunction("pow")(bindSymbol("x"), number(2))
+ binaryOperationFunction("pow")(bindSymbol(x), number(2))
}.compileToExpression(DoubleField)
- assertEquals(4.0, expr("x" to 2.0))
+ assertEquals(4.0, expr(x to 2.0))
+ }
+
+ private companion object {
+ private val x by symbol
}
}
diff --git a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmVariables.kt b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmVariables.kt
index 144d63eea..89b98d720 100644
--- a/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmVariables.kt
+++ b/kmath-ast/src/jvmTest/kotlin/space/kscience/kmath/asm/TestAsmVariables.kt
@@ -1,8 +1,15 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.asm
-import space.kscience.kmath.ast.MstRing
+import space.kscience.kmath.expressions.MstRing
import space.kscience.kmath.expressions.invoke
+import space.kscience.kmath.misc.symbol
import space.kscience.kmath.operations.ByteRing
+import space.kscience.kmath.operations.bindSymbol
import space.kscience.kmath.operations.invoke
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -11,13 +18,17 @@ import kotlin.test.assertFailsWith
internal class TestAsmVariables {
@Test
fun testVariable() {
- val expr = MstRing { bindSymbol("x") }.compileToExpression(ByteRing)
- assertEquals(1.toByte(), expr("x" to 1.toByte()))
+ val expr = MstRing { bindSymbol(x) }.compileToExpression(ByteRing)
+ assertEquals(1.toByte(), expr(x to 1.toByte()))
}
@Test
fun testUndefinedVariableFails() {
- val expr = MstRing { bindSymbol("x") }.compileToExpression(ByteRing)
+ val expr = MstRing { bindSymbol(x) }.compileToExpression(ByteRing)
assertFailsWith { expr() }
}
+
+ private companion object {
+ private val x by symbol
+ }
}
diff --git a/kmath-commons/build.gradle.kts b/kmath-commons/build.gradle.kts
index 56dcef29a..a208c956c 100644
--- a/kmath-commons/build.gradle.kts
+++ b/kmath-commons/build.gradle.kts
@@ -1,6 +1,8 @@
plugins {
- id("ru.mipt.npm.gradle.jvm")
+ kotlin("jvm")
+ id("ru.mipt.npm.gradle.common")
}
+
description = "Commons math binding for kmath"
dependencies {
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpression.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpression.kt
index 4f229cabd..736685789 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpression.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpression.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.expressions
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/CMIntegrator.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/CMIntegrator.kt
index e1ba7d777..92bf86128 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/CMIntegrator.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/CMIntegrator.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.integration
import org.apache.commons.math3.analysis.integration.IterativeLegendreGaussIntegrator
@@ -23,7 +28,7 @@ public class CMIntegrator(
val integrator = integratorBuilder(integrand)
val maxCalls = integrand.getFeature()?.maxCalls ?: defaultMaxCalls
val remainingCalls = maxCalls - integrand.calls
- val range = integrand.getFeature>()?.range
+ val range = integrand.getFeature()?.range
?: error("Integration range is not provided")
val res = integrator.integrate(remainingCalls, integrand.function, range.start, range.endInclusive)
@@ -31,7 +36,7 @@ public class CMIntegrator(
IntegrandValue(res) +
IntegrandAbsoluteAccuracy(integrator.absoluteAccuracy) +
IntegrandRelativeAccuracy(integrator.relativeAccuracy) +
- IntegrandCalls(integrator.evaluations + integrand.calls)
+ IntegrandCallsPerformed(integrator.evaluations + integrand.calls)
}
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/GaussRuleIntegrator.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/GaussRuleIntegrator.kt
index 5a18756ac..1c9915563 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/GaussRuleIntegrator.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/integration/GaussRuleIntegrator.kt
@@ -1,17 +1,6 @@
-/*
- * Copyright 2015 Alexander Nozik.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.commons.integration
@@ -28,12 +17,12 @@ public class GaussRuleIntegrator(
) : UnivariateIntegrator {
override fun integrate(integrand: UnivariateIntegrand): UnivariateIntegrand {
- val range = integrand.getFeature>()?.range
+ val range = integrand.getFeature()?.range
?: error("Integration range is not provided")
val integrator: GaussIntegrator = getIntegrator(range)
//TODO check performance
val res: Double = integrator.integrate(integrand.function)
- return integrand + IntegrandValue(res) + IntegrandCalls(integrand.calls + numpoints)
+ return integrand + IntegrandValue(res) + IntegrandCallsPerformed(integrand.calls + numpoints)
}
private fun getIntegrator(range: ClosedRange): GaussIntegrator {
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMMatrix.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMMatrix.kt
index 80929e6b9..11b097831 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMMatrix.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMMatrix.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.linear
import org.apache.commons.math3.linear.*
@@ -9,14 +14,14 @@ import space.kscience.kmath.structures.DoubleBuffer
import kotlin.reflect.KClass
import kotlin.reflect.cast
-public inline class CMMatrix(public val origin: RealMatrix) : Matrix {
+public class CMMatrix(public val origin: RealMatrix) : Matrix {
public override val rowNum: Int get() = origin.rowDimension
public override val colNum: Int get() = origin.columnDimension
public override operator fun get(i: Int, j: Int): Double = origin.getEntry(i, j)
}
-public inline class CMVector(public val origin: RealVector) : Point {
+public class CMVector(public val origin: RealVector) : Point {
public override val size: Int get() = origin.dimension
public override operator fun get(index: Int): Double = origin.getEntry(index)
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMSolver.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMSolver.kt
index b4706473a..ee602ca06 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMSolver.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/linear/CMSolver.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.linear
import org.apache.commons.math3.linear.*
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/CMOptimization.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/CMOptimization.kt
index 444c505c9..cfb8c39be 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/CMOptimization.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/CMOptimization.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.optimization
import org.apache.commons.math3.optim.*
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/cmFit.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/cmFit.kt
index f84dae693..13b5c73f4 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/cmFit.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/optimization/cmFit.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.optimization
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt
index 3fd98d097..16a6967e2 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.random
import space.kscience.kmath.stat.RandomGenerator
diff --git a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/transform/Transformations.kt b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/transform/Transformations.kt
index 010ea7e9f..d29491d63 100644
--- a/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/transform/Transformations.kt
+++ b/kmath-commons/src/main/kotlin/space/kscience/kmath/commons/transform/Transformations.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.transform
import kotlinx.coroutines.FlowPreview
diff --git a/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpressionTest.kt b/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpressionTest.kt
index ad0c0b7eb..879cd75b1 100644
--- a/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpressionTest.kt
+++ b/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/expressions/DerivativeStructureExpressionTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.expressions
import space.kscience.kmath.expressions.binding
diff --git a/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/integration/IntegrationTest.kt b/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/integration/IntegrationTest.kt
index d163203f7..9d475d04d 100644
--- a/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/integration/IntegrationTest.kt
+++ b/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/integration/IntegrationTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.integration
import org.junit.jupiter.api.Test
diff --git a/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/optimization/OptimizeTest.kt b/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/optimization/OptimizeTest.kt
index de22c066b..716cd1b0f 100644
--- a/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/optimization/OptimizeTest.kt
+++ b/kmath-commons/src/test/kotlin/space/kscience/kmath/commons/optimization/OptimizeTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.commons.optimization
import kotlinx.coroutines.runBlocking
diff --git a/kmath-complex/README.md b/kmath-complex/README.md
index ec5bf289f..70beab95a 100644
--- a/kmath-complex/README.md
+++ b/kmath-complex/README.md
@@ -8,7 +8,7 @@ Complex and hypercomplex number systems in KMath.
## Artifact:
-The Maven coordinates of this project are `space.kscience:kmath-complex:0.3.0-dev-4`.
+The Maven coordinates of this project are `space.kscience:kmath-complex:0.3.0-dev-7`.
**Gradle:**
```gradle
@@ -19,7 +19,7 @@ repositories {
}
dependencies {
- implementation 'space.kscience:kmath-complex:0.3.0-dev-4'
+ implementation 'space.kscience:kmath-complex:0.3.0-dev-7'
}
```
**Gradle Kotlin DSL:**
@@ -31,6 +31,6 @@ repositories {
}
dependencies {
- implementation("space.kscience:kmath-complex:0.3.0-dev-4")
+ implementation("space.kscience:kmath-complex:0.3.0-dev-7")
}
```
diff --git a/kmath-complex/build.gradle.kts b/kmath-complex/build.gradle.kts
index 5b9dc3ba0..ea74df646 100644
--- a/kmath-complex/build.gradle.kts
+++ b/kmath-complex/build.gradle.kts
@@ -1,15 +1,10 @@
-import ru.mipt.npm.gradle.Maturity
-
plugins {
- id("ru.mipt.npm.gradle.mpp")
+ kotlin("multiplatform")
+ id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
}
kotlin.sourceSets {
- all {
- languageSettings.useExperimentalAnnotation("kscience.kmath.misc.UnstableKMathAPI")
- }
-
commonMain {
dependencies {
api(project(":kmath-core"))
@@ -19,7 +14,7 @@ kotlin.sourceSets {
readme {
description = "Complex numbers and quaternions."
- maturity = Maturity.PROTOTYPE
+ maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
propertyByTemplate("artifact", rootProject.file("docs/templates/ARTIFACT-TEMPLATE.md"))
feature(
diff --git a/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt b/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt
index aa97c6463..8d626c17d 100644
--- a/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt
+++ b/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.memory.MemoryReader
diff --git a/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/ComplexFieldND.kt b/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/ComplexFieldND.kt
index 701b77df1..2c783eda0 100644
--- a/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/ComplexFieldND.kt
+++ b/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/ComplexFieldND.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.misc.UnstableKMathAPI
diff --git a/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt b/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt
index a8189dfe8..382b5cc05 100644
--- a/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt
+++ b/kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.memory.MemoryReader
diff --git a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexBufferSpecTest.kt b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexBufferSpecTest.kt
index e265e5896..17a077ea7 100644
--- a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexBufferSpecTest.kt
+++ b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexBufferSpecTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.structures.Buffer
diff --git a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexFieldTest.kt b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexFieldTest.kt
index e00b92077..cbaaa815b 100644
--- a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexFieldTest.kt
+++ b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexFieldTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.operations.invoke
diff --git a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexTest.kt b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexTest.kt
index e272f502f..7ad7f883d 100644
--- a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexTest.kt
+++ b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ComplexTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.operations.invoke
diff --git a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ExpressionFieldForComplexTest.kt b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ExpressionFieldForComplexTest.kt
index c08e73800..e023fcb81 100644
--- a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ExpressionFieldForComplexTest.kt
+++ b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/ExpressionFieldForComplexTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.expressions.FunctionalExpressionField
diff --git a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/QuaternionFieldTest.kt b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/QuaternionFieldTest.kt
index 5ce81a251..6784f3516 100644
--- a/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/QuaternionFieldTest.kt
+++ b/kmath-complex/src/commonTest/kotlin/space/kscience/kmath/complex/QuaternionFieldTest.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.complex
import space.kscience.kmath.operations.invoke
diff --git a/kmath-core/README.md b/kmath-core/README.md
index 5e4f1765d..e28873045 100644
--- a/kmath-core/README.md
+++ b/kmath-core/README.md
@@ -15,7 +15,7 @@ performance calculations to code generation.
## Artifact:
-The Maven coordinates of this project are `space.kscience:kmath-core:0.3.0-dev-4`.
+The Maven coordinates of this project are `space.kscience:kmath-core:0.3.0-dev-7`.
**Gradle:**
```gradle
@@ -26,7 +26,7 @@ repositories {
}
dependencies {
- implementation 'space.kscience:kmath-core:0.3.0-dev-4'
+ implementation 'space.kscience:kmath-core:0.3.0-dev-7'
}
```
**Gradle Kotlin DSL:**
@@ -38,6 +38,6 @@ repositories {
}
dependencies {
- implementation("space.kscience:kmath-core:0.3.0-dev-4")
+ implementation("space.kscience:kmath-core:0.3.0-dev-7")
}
```
diff --git a/kmath-core/api/kmath-core.api b/kmath-core/api/kmath-core.api
index 831460de5..38cfbd58d 100644
--- a/kmath-core/api/kmath-core.api
+++ b/kmath-core/api/kmath-core.api
@@ -1,18 +1,10 @@
public final class space/kscience/kmath/data/ColumnarDataKt {
}
-public final class space/kscience/kmath/data/XYColumnarData$DefaultImpls {
- public static fun get (Lspace/kscience/kmath/data/XYColumnarData;Lspace/kscience/kmath/misc/Symbol;)Lspace/kscience/kmath/structures/Buffer;
-}
-
public final class space/kscience/kmath/data/XYColumnarDataKt {
public static synthetic fun asXYData$default (Lspace/kscience/kmath/nd/Structure2D;IIILjava/lang/Object;)Lspace/kscience/kmath/data/XYColumnarData;
}
-public final class space/kscience/kmath/data/XYZColumnarData$DefaultImpls {
- public static fun get (Lspace/kscience/kmath/data/XYZColumnarData;Lspace/kscience/kmath/misc/Symbol;)Lspace/kscience/kmath/structures/Buffer;
-}
-
public abstract interface class space/kscience/kmath/domains/Domain {
public abstract fun contains (Lspace/kscience/kmath/structures/Buffer;)Z
public abstract fun getDimension ()I
@@ -53,20 +45,11 @@ public abstract interface class space/kscience/kmath/expressions/ExpressionAlgeb
public abstract fun const (Ljava/lang/Object;)Ljava/lang/Object;
}
-public final class space/kscience/kmath/expressions/ExpressionAlgebra$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/expressions/ExpressionAlgebra;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/expressions/ExpressionAlgebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/expressions/ExpressionAlgebra;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/expressions/ExpressionAlgebra;Ljava/lang/String;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/expressions/ExpressionAlgebra;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/expressions/ExpressionAlgebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
-}
-
public final class space/kscience/kmath/expressions/ExpressionBuildersKt {
public static final fun extendedFieldExpression (Lspace/kscience/kmath/operations/ExtendedField;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
public static final fun fieldExpression (Lspace/kscience/kmath/operations/Field;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
public static final fun ringExpression (Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
- public static final fun spaceExpression (Lspace/kscience/kmath/operations/Group;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
+ public static final fun spaceExpression (Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
}
public final class space/kscience/kmath/expressions/ExpressionKt {
@@ -84,18 +67,12 @@ public abstract class space/kscience/kmath/expressions/FirstDerivativeExpression
public abstract class space/kscience/kmath/expressions/FunctionalExpressionAlgebra : space/kscience/kmath/expressions/ExpressionAlgebra {
public fun (Lspace/kscience/kmath/operations/Algebra;)V
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun const (Ljava/lang/Object;)Ljava/lang/Object;
public fun const (Ljava/lang/Object;)Lspace/kscience/kmath/expressions/Expression;
public final fun getAlgebra ()Lspace/kscience/kmath/operations/Algebra;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
@@ -103,51 +80,34 @@ public final class space/kscience/kmath/expressions/FunctionalExpressionAlgebraK
public static final fun expressionInExtendedField (Lspace/kscience/kmath/operations/ExtendedField;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
public static final fun expressionInField (Lspace/kscience/kmath/operations/Field;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
public static final fun expressionInRing (Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
- public static final fun expressionInSpace (Lspace/kscience/kmath/operations/Group;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
+ public static final fun expressionInSpace (Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/Expression;
}
public class space/kscience/kmath/expressions/FunctionalExpressionExtendedField : space/kscience/kmath/expressions/FunctionalExpressionField, space/kscience/kmath/operations/ExtendedField {
public fun (Lspace/kscience/kmath/operations/ExtendedField;)V
public synthetic fun acos (Ljava/lang/Object;)Ljava/lang/Object;
public fun acos (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun acosh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun acosh (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun asin (Ljava/lang/Object;)Ljava/lang/Object;
public fun asin (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun asinh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun asinh (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun atan (Ljava/lang/Object;)Ljava/lang/Object;
public fun atan (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun atanh (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
public fun cos (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun cosh (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun exp (Ljava/lang/Object;)Ljava/lang/Object;
public fun exp (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
public fun ln (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun pow (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
public fun sin (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun sinh (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
public fun sqrt (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
- public fun tan (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun tanh (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
@@ -156,28 +116,12 @@ public class space/kscience/kmath/expressions/FunctionalExpressionField : space/
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public final fun div (Ljava/lang/Object;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public fun div (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
public final fun div (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Object;)Lspace/kscience/kmath/expressions/Expression;
- public fun div (Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide (Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
- public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Lspace/kscience/kmath/expressions/Expression;D)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Number;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun times (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/Expression;
public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
@@ -188,19 +132,13 @@ public class space/kscience/kmath/expressions/FunctionalExpressionGroup : space/
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public final fun minus (Ljava/lang/Object;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public final fun minus (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Object;)Lspace/kscience/kmath/expressions/Expression;
- public fun minus (Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public final fun plus (Ljava/lang/Object;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public final fun plus (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Object;)Lspace/kscience/kmath/expressions/Expression;
- public fun plus (Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
}
public class space/kscience/kmath/expressions/FunctionalExpressionRing : space/kscience/kmath/expressions/FunctionalExpressionGroup, space/kscience/kmath/operations/Ring {
@@ -210,13 +148,217 @@ public class space/kscience/kmath/expressions/FunctionalExpressionRing : space/k
public fun getOne ()Lspace/kscience/kmath/expressions/Expression;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public final fun times (Ljava/lang/Object;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public final fun times (Lspace/kscience/kmath/expressions/Expression;Ljava/lang/Object;)Lspace/kscience/kmath/expressions/Expression;
- public fun times (Lspace/kscience/kmath/expressions/Expression;Lspace/kscience/kmath/expressions/Expression;)Lspace/kscience/kmath/expressions/Expression;
public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
+public abstract class space/kscience/kmath/expressions/MST {
+}
+
+public final class space/kscience/kmath/expressions/MST$Binary : space/kscience/kmath/expressions/MST {
+ public fun (Ljava/lang/String;Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)V
+ public final fun component1 ()Ljava/lang/String;
+ public final fun component2 ()Lspace/kscience/kmath/expressions/MST;
+ public final fun component3 ()Lspace/kscience/kmath/expressions/MST;
+ public final fun copy (Ljava/lang/String;Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public static synthetic fun copy$default (Lspace/kscience/kmath/expressions/MST$Binary;Ljava/lang/String;Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;ILjava/lang/Object;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getLeft ()Lspace/kscience/kmath/expressions/MST;
+ public final fun getOperation ()Ljava/lang/String;
+ public final fun getRight ()Lspace/kscience/kmath/expressions/MST;
+ public fun hashCode ()I
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/kmath/expressions/MST$Numeric : space/kscience/kmath/expressions/MST {
+ public fun (Ljava/lang/Number;)V
+ public final fun component1 ()Ljava/lang/Number;
+ public final fun copy (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public static synthetic fun copy$default (Lspace/kscience/kmath/expressions/MST$Numeric;Ljava/lang/Number;ILjava/lang/Object;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getValue ()Ljava/lang/Number;
+ public fun hashCode ()I
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/kmath/expressions/MST$Symbolic : space/kscience/kmath/expressions/MST {
+ public fun (Ljava/lang/String;)V
+ public final fun component1 ()Ljava/lang/String;
+ public final fun copy (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public static synthetic fun copy$default (Lspace/kscience/kmath/expressions/MST$Symbolic;Ljava/lang/String;ILjava/lang/Object;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getValue ()Ljava/lang/String;
+ public fun hashCode ()I
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/kmath/expressions/MST$Unary : space/kscience/kmath/expressions/MST {
+ public fun (Ljava/lang/String;Lspace/kscience/kmath/expressions/MST;)V
+ public final fun component1 ()Ljava/lang/String;
+ public final fun component2 ()Lspace/kscience/kmath/expressions/MST;
+ public final fun copy (Ljava/lang/String;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public static synthetic fun copy$default (Lspace/kscience/kmath/expressions/MST$Unary;Ljava/lang/String;Lspace/kscience/kmath/expressions/MST;ILjava/lang/Object;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getOperation ()Ljava/lang/String;
+ public final fun getValue ()Lspace/kscience/kmath/expressions/MST;
+ public fun hashCode ()I
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/kmath/expressions/MSTKt {
+ public static final fun evaluate (Lspace/kscience/kmath/operations/Algebra;Lspace/kscience/kmath/expressions/MST;)Ljava/lang/Object;
+ public static final fun interpret (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/operations/Algebra;Ljava/util/Map;)Ljava/lang/Object;
+ public static final fun interpret (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/operations/Algebra;[Lkotlin/Pair;)Ljava/lang/Object;
+ public static final fun toExpression (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/operations/Algebra;)Lspace/kscience/kmath/expressions/Expression;
+}
+
+public final class space/kscience/kmath/expressions/MstAlgebra : space/kscience/kmath/operations/NumericAlgebra {
+ public static final field INSTANCE Lspace/kscience/kmath/expressions/MstAlgebra;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
+ public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+}
+
+public final class space/kscience/kmath/expressions/MstExtendedField : space/kscience/kmath/operations/ExtendedField, space/kscience/kmath/operations/NumericAlgebra {
+ public static final field INSTANCE Lspace/kscience/kmath/expressions/MstExtendedField;
+ public synthetic fun acos (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun acos (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun acosh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun acosh (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun add (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun asin (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun asin (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun asinh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun asinh (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun atan (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun atan (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun atanh (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun cos (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun cosh (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun divide (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun exp (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun exp (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun getOne ()Ljava/lang/Object;
+ public fun getOne ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun getZero ()Ljava/lang/Object;
+ public fun getZero ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun ln (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun minus (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun multiply (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
+ public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
+ public fun power (Lspace/kscience/kmath/expressions/MST;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
+ public fun scale (Lspace/kscience/kmath/expressions/MST;D)Lspace/kscience/kmath/expressions/MST;
+ public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun sin (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun sinh (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun tan (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun tanh (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryMinus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryPlus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+}
+
+public final class space/kscience/kmath/expressions/MstField : space/kscience/kmath/operations/Field, space/kscience/kmath/operations/NumbersAddOperations, space/kscience/kmath/operations/ScaleOperations {
+ public static final field INSTANCE Lspace/kscience/kmath/expressions/MstField;
+ public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun add (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun divide (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun getOne ()Ljava/lang/Object;
+ public fun getOne ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun getZero ()Ljava/lang/Object;
+ public fun getZero ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun minus (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun multiply (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
+ public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
+ public fun scale (Lspace/kscience/kmath/expressions/MST;D)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryMinus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryPlus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+}
+
+public final class space/kscience/kmath/expressions/MstGroup : space/kscience/kmath/operations/Group, space/kscience/kmath/operations/NumericAlgebra, space/kscience/kmath/operations/ScaleOperations {
+ public static final field INSTANCE Lspace/kscience/kmath/expressions/MstGroup;
+ public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun add (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public synthetic fun getZero ()Ljava/lang/Object;
+ public fun getZero ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun minus (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
+ public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
+ public fun scale (Lspace/kscience/kmath/expressions/MST;D)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryMinus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryPlus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+}
+
+public final class space/kscience/kmath/expressions/MstRing : space/kscience/kmath/operations/NumbersAddOperations, space/kscience/kmath/operations/Ring, space/kscience/kmath/operations/ScaleOperations {
+ public static final field INSTANCE Lspace/kscience/kmath/expressions/MstRing;
+ public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun add (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/MST$Symbolic;
+ public synthetic fun getOne ()Ljava/lang/Object;
+ public fun getOne ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun getZero ()Ljava/lang/Object;
+ public fun getZero ()Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun minus (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun multiply (Lspace/kscience/kmath/expressions/MST;Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
+ public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/MST$Numeric;
+ public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
+ public fun scale (Lspace/kscience/kmath/expressions/MST;D)Lspace/kscience/kmath/expressions/MST$Binary;
+ public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryMinus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryPlus (Lspace/kscience/kmath/expressions/MST;)Lspace/kscience/kmath/expressions/MST$Unary;
+}
+
public final class space/kscience/kmath/expressions/SimpleAutoDiffExpression : space/kscience/kmath/expressions/FirstDerivativeExpression {
public fun (Lspace/kscience/kmath/operations/Field;Lkotlin/jvm/functions/Function1;)V
public fun derivativeOrNull (Lspace/kscience/kmath/misc/Symbol;)Lspace/kscience/kmath/expressions/Expression;
@@ -251,12 +393,9 @@ public final class space/kscience/kmath/expressions/SimpleAutoDiffExtendedField
public fun ln (Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun pow (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public final fun pow (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Lspace/kscience/kmath/expressions/AutoDiffValue;D)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
@@ -270,28 +409,18 @@ public final class space/kscience/kmath/expressions/SimpleAutoDiffExtendedField
public fun tan (Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun tanh (Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
public class space/kscience/kmath/expressions/SimpleAutoDiffField : space/kscience/kmath/expressions/ExpressionAlgebra, space/kscience/kmath/operations/Field, space/kscience/kmath/operations/NumbersAddOperations {
public fun (Lspace/kscience/kmath/operations/Field;Ljava/util/Map;)V
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun add (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun const (Ljava/lang/Object;)Ljava/lang/Object;
public fun const (Ljava/lang/Object;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public final fun const (Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public final fun derive (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun div (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun div (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public final fun getContext ()Lspace/kscience/kmath/operations/Field;
@@ -300,44 +429,15 @@ public class space/kscience/kmath/expressions/SimpleAutoDiffField : space/kscien
public fun getOne ()Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun minus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Ljava/lang/Number;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun minus (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun plus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/lang/Number;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun plus (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Lspace/kscience/kmath/expressions/AutoDiffValue;D)Lspace/kscience/kmath/expressions/AutoDiffValue;
public final fun setD (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Object;)V
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Number;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Lspace/kscience/kmath/expressions/AutoDiffValue;Ljava/lang/Number;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun times (Lspace/kscience/kmath/expressions/AutoDiffValue;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
}
public final class space/kscience/kmath/expressions/SimpleAutoDiffKt {
@@ -366,19 +466,6 @@ public final class space/kscience/kmath/expressions/SimpleAutoDiffKt {
public static final fun tanh (Lspace/kscience/kmath/expressions/SimpleAutoDiffField;Lspace/kscience/kmath/expressions/AutoDiffValue;)Lspace/kscience/kmath/expressions/AutoDiffValue;
}
-public final class space/kscience/kmath/expressions/SymbolIndexer$DefaultImpls {
- public static fun get (Lspace/kscience/kmath/expressions/SymbolIndexer;Ljava/util/List;Lspace/kscience/kmath/misc/Symbol;)Ljava/lang/Object;
- public static fun get (Lspace/kscience/kmath/expressions/SymbolIndexer;Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/misc/Symbol;Lspace/kscience/kmath/misc/Symbol;)Ljava/lang/Object;
- public static fun get (Lspace/kscience/kmath/expressions/SymbolIndexer;Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/misc/Symbol;)Ljava/lang/Object;
- public static fun get (Lspace/kscience/kmath/expressions/SymbolIndexer;[DLspace/kscience/kmath/misc/Symbol;)D
- public static fun get (Lspace/kscience/kmath/expressions/SymbolIndexer;[Ljava/lang/Object;Lspace/kscience/kmath/misc/Symbol;)Ljava/lang/Object;
- public static fun indexOf (Lspace/kscience/kmath/expressions/SymbolIndexer;Lspace/kscience/kmath/misc/Symbol;)I
- public static fun toDoubleArray (Lspace/kscience/kmath/expressions/SymbolIndexer;Ljava/util/Map;)[D
- public static fun toList (Lspace/kscience/kmath/expressions/SymbolIndexer;Ljava/util/Map;)Ljava/util/List;
- public static fun toMap (Lspace/kscience/kmath/expressions/SymbolIndexer;[D)Ljava/util/Map;
- public static fun toPoint (Lspace/kscience/kmath/expressions/SymbolIndexer;Ljava/util/Map;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/structures/Buffer;
-}
-
public final class space/kscience/kmath/expressions/SymbolIndexerKt {
}
@@ -390,15 +477,9 @@ public final class space/kscience/kmath/linear/BufferedLinearSpace : space/kscie
public fun dot (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public fun getElementAlgebra ()Lspace/kscience/kmath/operations/Ring;
public fun minus (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public fun minus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public fun plus (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public fun plus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public fun times (Ljava/lang/Object;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public fun times (Lspace/kscience/kmath/nd/Structure2D;Ljava/lang/Object;)Lspace/kscience/kmath/nd/Structure2D;
- public fun times (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Object;)Lspace/kscience/kmath/structures/Buffer;
public fun unaryMinus (Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public fun unaryMinus (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
}
public abstract interface class space/kscience/kmath/linear/CholeskyDecompositionFeature : space/kscience/kmath/linear/MatrixFeature {
@@ -427,11 +508,7 @@ public final class space/kscience/kmath/linear/LFeature : space/kscience/kmath/l
public abstract interface class space/kscience/kmath/linear/LinearSolver {
public abstract fun inverse (Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
public abstract fun solve (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun solve (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
-}
-
-public final class space/kscience/kmath/linear/LinearSolver$DefaultImpls {
- public static fun solve (Lspace/kscience/kmath/linear/LinearSolver;Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
+ public fun solve (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
}
public final class space/kscience/kmath/linear/LinearSolverKt {
@@ -443,19 +520,19 @@ public abstract interface class space/kscience/kmath/linear/LinearSpace {
public static final field Companion Lspace/kscience/kmath/linear/LinearSpace$Companion;
public abstract fun buildMatrix (IILkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/Structure2D;
public abstract fun buildVector (ILkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/structures/Buffer;
- public abstract fun dot (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun dot (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
+ public fun dot (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
+ public fun dot (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public abstract fun getElementAlgebra ()Lspace/kscience/kmath/operations/Ring;
- public abstract fun minus (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun minus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public abstract fun plus (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun plus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public abstract fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun times (Ljava/lang/Object;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public abstract fun times (Lspace/kscience/kmath/nd/Structure2D;Ljava/lang/Object;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun times (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Object;)Lspace/kscience/kmath/structures/Buffer;
- public abstract fun unaryMinus (Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public abstract fun unaryMinus (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
+ public fun minus (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
+ public fun minus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
+ public fun plus (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
+ public fun plus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
+ public fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
+ public fun times (Ljava/lang/Object;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
+ public fun times (Lspace/kscience/kmath/nd/Structure2D;Ljava/lang/Object;)Lspace/kscience/kmath/nd/Structure2D;
+ public fun times (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Object;)Lspace/kscience/kmath/structures/Buffer;
+ public fun unaryMinus (Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
+ public fun unaryMinus (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
}
public final class space/kscience/kmath/linear/LinearSpace$Companion {
@@ -464,21 +541,6 @@ public final class space/kscience/kmath/linear/LinearSpace$Companion {
public final fun getReal ()Lspace/kscience/kmath/linear/LinearSpace;
}
-public final class space/kscience/kmath/linear/LinearSpace$DefaultImpls {
- public static fun dot (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public static fun dot (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public static fun minus (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public static fun minus (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public static fun plus (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public static fun plus (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public static fun times (Lspace/kscience/kmath/linear/LinearSpace;Ljava/lang/Object;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public static fun times (Lspace/kscience/kmath/linear/LinearSpace;Ljava/lang/Object;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public static fun times (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/nd/Structure2D;Ljava/lang/Object;)Lspace/kscience/kmath/nd/Structure2D;
- public static fun times (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Object;)Lspace/kscience/kmath/structures/Buffer;
- public static fun unaryMinus (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
- public static fun unaryMinus (Lspace/kscience/kmath/linear/LinearSpace;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
-}
-
public final class space/kscience/kmath/linear/LinearSpaceKt {
public static final fun invoke (Lspace/kscience/kmath/linear/LinearSpace;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
}
@@ -587,15 +649,10 @@ public final class space/kscience/kmath/linear/UnitFeature : space/kscience/kmat
public final class space/kscience/kmath/linear/VirtualMatrix : space/kscience/kmath/nd/Structure2D {
public fun (IILkotlin/jvm/functions/Function2;)V
- public fun elements ()Lkotlin/sequences/Sequence;
public fun get (II)Ljava/lang/Object;
- public fun get ([I)Ljava/lang/Object;
public fun getColNum ()I
- public fun getColumns ()Ljava/util/List;
- public fun getDimension ()I
public final fun getGenerator ()Lkotlin/jvm/functions/Function2;
public fun getRowNum ()I
- public fun getRows ()Ljava/util/List;
public fun getShape ()[I
}
@@ -608,9 +665,9 @@ public final class space/kscience/kmath/misc/CumulativeKt {
public static final fun cumulative (Ljava/util/Iterator;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/util/Iterator;
public static final fun cumulative (Ljava/util/List;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/util/List;
public static final fun cumulative (Lkotlin/sequences/Sequence;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Lkotlin/sequences/Sequence;
- public static final fun cumulativeSum (Ljava/lang/Iterable;Lspace/kscience/kmath/operations/Group;)Ljava/lang/Iterable;
- public static final fun cumulativeSum (Ljava/util/List;Lspace/kscience/kmath/operations/Group;)Ljava/util/List;
- public static final fun cumulativeSum (Lkotlin/sequences/Sequence;Lspace/kscience/kmath/operations/Group;)Lkotlin/sequences/Sequence;
+ public static final fun cumulativeSum (Ljava/lang/Iterable;Lspace/kscience/kmath/operations/Ring;)Ljava/lang/Iterable;
+ public static final fun cumulativeSum (Ljava/util/List;Lspace/kscience/kmath/operations/Ring;)Ljava/util/List;
+ public static final fun cumulativeSum (Lkotlin/sequences/Sequence;Lspace/kscience/kmath/operations/Ring;)Lkotlin/sequences/Sequence;
public static final fun cumulativeSumOfDouble (Ljava/lang/Iterable;)Ljava/lang/Iterable;
public static final fun cumulativeSumOfDouble (Ljava/util/List;)Ljava/util/List;
public static final fun cumulativeSumOfDouble (Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
@@ -659,7 +716,7 @@ public abstract interface class space/kscience/kmath/nd/AlgebraND {
public abstract fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
public abstract fun getElementContext ()Lspace/kscience/kmath/operations/Algebra;
public abstract fun getShape ()[I
- public abstract fun invoke (Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun invoke (Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
public abstract fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
public abstract fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
public abstract fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
@@ -668,34 +725,25 @@ public abstract interface class space/kscience/kmath/nd/AlgebraND {
public final class space/kscience/kmath/nd/AlgebraND$Companion {
}
-public final class space/kscience/kmath/nd/AlgebraND$DefaultImpls {
- public static fun invoke (Lspace/kscience/kmath/nd/AlgebraND;Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
-}
-
public abstract interface class space/kscience/kmath/nd/BufferAlgebraND : space/kscience/kmath/nd/AlgebraND {
- public abstract fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
- public abstract fun getBuffer (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/structures/Buffer;
+ public fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
+ public synthetic fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
+ public fun getBuffer (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/structures/Buffer;
public abstract fun getBufferFactory ()Lkotlin/jvm/functions/Function2;
public abstract fun getStrides ()Lspace/kscience/kmath/nd/Strides;
- public abstract fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
- public abstract fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
- public abstract fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
-}
-
-public final class space/kscience/kmath/nd/BufferAlgebraND$DefaultImpls {
- public static fun combine (Lspace/kscience/kmath/nd/BufferAlgebraND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
- public static fun getBuffer (Lspace/kscience/kmath/nd/BufferAlgebraND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/structures/Buffer;
- public static fun invoke (Lspace/kscience/kmath/nd/BufferAlgebraND;Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun map (Lspace/kscience/kmath/nd/BufferAlgebraND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
- public static fun mapIndexed (Lspace/kscience/kmath/nd/BufferAlgebraND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
- public static fun produce (Lspace/kscience/kmath/nd/BufferAlgebraND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
+ public fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
+ public synthetic fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
+ public fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
+ public synthetic fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
+ public fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
+ public synthetic fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
}
public final class space/kscience/kmath/nd/BufferAlgebraNDKt {
public static final fun field (Lspace/kscience/kmath/nd/AlgebraND$Companion;Lspace/kscience/kmath/operations/Field;Lkotlin/jvm/functions/Function2;[I)Lspace/kscience/kmath/nd/BufferedFieldND;
- public static final fun group (Lspace/kscience/kmath/nd/AlgebraND$Companion;Lspace/kscience/kmath/operations/Group;Lkotlin/jvm/functions/Function2;[I)Lspace/kscience/kmath/nd/BufferedGroupND;
+ public static final fun group (Lspace/kscience/kmath/nd/AlgebraND$Companion;Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function2;[I)Lspace/kscience/kmath/nd/BufferedGroupND;
public static final fun ndField (Lspace/kscience/kmath/operations/Field;Lkotlin/jvm/functions/Function2;[ILkotlin/jvm/functions/Function1;)Ljava/lang/Object;
- public static final fun ndGroup (Lspace/kscience/kmath/operations/Group;Lkotlin/jvm/functions/Function2;[ILkotlin/jvm/functions/Function1;)Ljava/lang/Object;
+ public static final fun ndGroup (Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function2;[ILkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ndRing (Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function2;[ILkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ring (Lspace/kscience/kmath/nd/AlgebraND$Companion;Lspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function2;[I)Lspace/kscience/kmath/nd/BufferedRingND;
}
@@ -705,7 +753,6 @@ public final class space/kscience/kmath/nd/BufferND : space/kscience/kmath/nd/St
public fun elements ()Lkotlin/sequences/Sequence;
public fun get ([I)Ljava/lang/Object;
public final fun getBuffer ()Lspace/kscience/kmath/structures/Buffer;
- public fun getDimension ()I
public fun getShape ()[I
public final fun getStrides ()Lspace/kscience/kmath/nd/Strides;
public fun toString ()Ljava/lang/String;
@@ -713,47 +760,12 @@ public final class space/kscience/kmath/nd/BufferND : space/kscience/kmath/nd/St
public class space/kscience/kmath/nd/BufferedFieldND : space/kscience/kmath/nd/BufferedRingND, space/kscience/kmath/nd/FieldND {
public fun ([ILspace/kscience/kmath/operations/Field;Lkotlin/jvm/functions/Function2;)V
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun div (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun div (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public fun div (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public fun div (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun divide (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
- public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Lspace/kscience/kmath/nd/StructureND;D)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun times (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
}
public class space/kscience/kmath/nd/BufferedGroupND : space/kscience/kmath/nd/BufferAlgebraND, space/kscience/kmath/nd/GroupND {
public fun ([ILspace/kscience/kmath/operations/Group;Lkotlin/jvm/functions/Function2;)V
- public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun add (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
- public fun getBuffer (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/structures/Buffer;
public final fun getBufferFactory ()Lkotlin/jvm/functions/Function2;
public synthetic fun getElementContext ()Lspace/kscience/kmath/operations/Algebra;
public final fun getElementContext ()Lspace/kscience/kmath/operations/Group;
@@ -761,41 +773,14 @@ public class space/kscience/kmath/nd/BufferedGroupND : space/kscience/kmath/nd/B
public fun getStrides ()Lspace/kscience/kmath/nd/Strides;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Lspace/kscience/kmath/nd/BufferND;
- public fun invoke (Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
- public fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun minus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public fun minus (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun plus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public fun plus (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
}
public class space/kscience/kmath/nd/BufferedRingND : space/kscience/kmath/nd/BufferedGroupND, space/kscience/kmath/nd/RingND {
public fun ([ILspace/kscience/kmath/operations/Ring;Lkotlin/jvm/functions/Function2;)V
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getOne ()Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun multiply (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun times (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public fun times (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
}
public final class space/kscience/kmath/nd/DefaultStrides : space/kscience/kmath/nd/Strides {
@@ -807,7 +792,6 @@ public final class space/kscience/kmath/nd/DefaultStrides : space/kscience/kmath
public fun getStrides ()Ljava/util/List;
public fun hashCode ()I
public fun index (I)[I
- public fun indices ()Lkotlin/sequences/Sequence;
public fun offset ([I)I
}
@@ -829,8 +813,6 @@ public final class space/kscience/kmath/nd/DoubleFieldND : space/kscience/kmath/
public fun atan (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/BufferND;
public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun atanh (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
public fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
public synthetic fun combine (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
@@ -851,37 +833,22 @@ public final class space/kscience/kmath/nd/DoubleFieldND : space/kscience/kmath/
public synthetic fun map (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
public fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/BufferND;
public synthetic fun mapIndexed (Lspace/kscience/kmath/nd/StructureND;Lkotlin/jvm/functions/Function3;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun minus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun minus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun number (Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun plus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun plus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun pow (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/BufferND;
public fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/BufferND;
public synthetic fun produce (Lkotlin/jvm/functions/Function2;)Lspace/kscience/kmath/nd/StructureND;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Lspace/kscience/kmath/nd/StructureND;D)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
public fun sin (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/BufferND;
public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
public fun sinh (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
- public fun sqrt (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
public fun tan (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/BufferND;
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun tanh (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/BufferND;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
public final class space/kscience/kmath/nd/DoubleFieldNDKt {
@@ -890,141 +857,50 @@ public final class space/kscience/kmath/nd/DoubleFieldNDKt {
}
public abstract interface class space/kscience/kmath/nd/FieldND : space/kscience/kmath/nd/RingND, space/kscience/kmath/operations/Field, space/kscience/kmath/operations/ScaleOperations {
- public abstract fun div (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun div (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun divide (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
-}
-
-public final class space/kscience/kmath/nd/FieldND$DefaultImpls {
- public static fun add (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun binaryOperation (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public static fun div (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun div (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public static fun div (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun div (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun divide (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun invoke (Lspace/kscience/kmath/nd/FieldND;Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun leftSideNumberOperation (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun leftSideNumberOperationFunction (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun minus (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun multiply (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun number (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun rightSideNumberOperation (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public static fun rightSideNumberOperationFunction (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun times (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun unaryOperation (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/nd/FieldND;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/nd/FieldND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun div (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun div (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
+ public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun divide (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
}
public abstract interface class space/kscience/kmath/nd/GroupND : space/kscience/kmath/nd/AlgebraND, space/kscience/kmath/operations/Group {
public static final field Companion Lspace/kscience/kmath/nd/GroupND$Companion;
- public abstract fun add (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun minus (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun minus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun plus (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun plus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
+ public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun add (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun minus (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun minus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
+ public fun plus (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun plus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
}
public final class space/kscience/kmath/nd/GroupND$Companion {
}
-public final class space/kscience/kmath/nd/GroupND$DefaultImpls {
- public static fun add (Lspace/kscience/kmath/nd/GroupND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun binaryOperation (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public static fun invoke (Lspace/kscience/kmath/nd/GroupND;Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/GroupND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/GroupND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/GroupND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/GroupND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun unaryOperation (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/nd/GroupND;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/nd/GroupND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
-}
-
public abstract interface class space/kscience/kmath/nd/MutableStructure1D : space/kscience/kmath/nd/MutableStructureND, space/kscience/kmath/nd/Structure1D, space/kscience/kmath/structures/MutableBuffer {
- public abstract fun set ([ILjava/lang/Object;)V
-}
-
-public final class space/kscience/kmath/nd/MutableStructure1D$DefaultImpls {
- public static fun get (Lspace/kscience/kmath/nd/MutableStructure1D;[I)Ljava/lang/Object;
- public static fun getDimension (Lspace/kscience/kmath/nd/MutableStructure1D;)I
- public static fun iterator (Lspace/kscience/kmath/nd/MutableStructure1D;)Ljava/util/Iterator;
- public static fun set (Lspace/kscience/kmath/nd/MutableStructure1D;[ILjava/lang/Object;)V
+ public fun set ([ILjava/lang/Object;)V
}
public abstract interface class space/kscience/kmath/nd/MutableStructure2D : space/kscience/kmath/nd/MutableStructureND, space/kscience/kmath/nd/Structure2D {
- public abstract fun getColumns ()Ljava/util/List;
- public abstract fun getRows ()Ljava/util/List;
+ public fun getColumns ()Ljava/util/List;
+ public fun getRows ()Ljava/util/List;
public abstract fun set (IILjava/lang/Object;)V
}
-public final class space/kscience/kmath/nd/MutableStructure2D$DefaultImpls {
- public static fun elements (Lspace/kscience/kmath/nd/MutableStructure2D;)Lkotlin/sequences/Sequence;
- public static fun get (Lspace/kscience/kmath/nd/MutableStructure2D;[I)Ljava/lang/Object;
- public static fun getColumns (Lspace/kscience/kmath/nd/MutableStructure2D;)Ljava/util/List;
- public static fun getDimension (Lspace/kscience/kmath/nd/MutableStructure2D;)I
- public static fun getRows (Lspace/kscience/kmath/nd/MutableStructure2D;)Ljava/util/List;
- public static fun getShape (Lspace/kscience/kmath/nd/MutableStructure2D;)[I
-}
-
public abstract interface class space/kscience/kmath/nd/MutableStructureND : space/kscience/kmath/nd/StructureND {
public abstract fun set ([ILjava/lang/Object;)V
}
-public final class space/kscience/kmath/nd/MutableStructureND$DefaultImpls {
- public static fun getDimension (Lspace/kscience/kmath/nd/MutableStructureND;)I
-}
-
public abstract interface class space/kscience/kmath/nd/RingND : space/kscience/kmath/nd/GroupND, space/kscience/kmath/operations/Ring {
public static final field Companion Lspace/kscience/kmath/nd/RingND$Companion;
- public abstract fun multiply (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public abstract fun times (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
+ public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun multiply (Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
+ public fun times (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
}
public final class space/kscience/kmath/nd/RingND$Companion {
}
-public final class space/kscience/kmath/nd/RingND$DefaultImpls {
- public static fun add (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun binaryOperation (Lspace/kscience/kmath/nd/RingND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/nd/RingND;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/nd/RingND;Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/nd/RingND;Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
- public static fun invoke (Lspace/kscience/kmath/nd/RingND;Lkotlin/jvm/functions/Function1;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/RingND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun minus (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun multiply (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/RingND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun plus (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/RingND;Ljava/lang/Object;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/StructureND;
- public static fun times (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun unaryOperation (Lspace/kscience/kmath/nd/RingND;Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/nd/RingND;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/nd/RingND;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
-}
-
public final class space/kscience/kmath/nd/ShapeMismatchException : java/lang/RuntimeException {
public fun ([I[I)V
public final fun getActual ()[I
@@ -1033,28 +909,12 @@ public final class space/kscience/kmath/nd/ShapeMismatchException : java/lang/Ru
public final class space/kscience/kmath/nd/ShortRingND : space/kscience/kmath/nd/BufferedRingND, space/kscience/kmath/operations/NumbersAddOperations {
public fun ([I)V
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getOne ()Lspace/kscience/kmath/nd/BufferND;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun minus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun minus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/nd/BufferND;
- public synthetic fun plus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/lang/Number;Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun plus (Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Lspace/kscience/kmath/nd/StructureND;Ljava/lang/Number;)Lspace/kscience/kmath/nd/StructureND;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
}
public final class space/kscience/kmath/nd/ShortRingNDKt {
@@ -1067,30 +927,20 @@ public abstract interface class space/kscience/kmath/nd/Strides {
public abstract fun getShape ()[I
public abstract fun getStrides ()Ljava/util/List;
public abstract fun index (I)[I
- public abstract fun indices ()Lkotlin/sequences/Sequence;
+ public fun indices ()Lkotlin/sequences/Sequence;
public abstract fun offset ([I)I
}
-public final class space/kscience/kmath/nd/Strides$DefaultImpls {
- public static fun indices (Lspace/kscience/kmath/nd/Strides;)Lkotlin/sequences/Sequence;
-}
-
public abstract interface class space/kscience/kmath/nd/Structure1D : space/kscience/kmath/nd/StructureND, space/kscience/kmath/structures/Buffer {
public static final field Companion Lspace/kscience/kmath/nd/Structure1D$Companion;
- public abstract fun get ([I)Ljava/lang/Object;
- public abstract fun getDimension ()I
- public abstract fun iterator ()Ljava/util/Iterator;
+ public fun get ([I)Ljava/lang/Object;
+ public fun getDimension ()I
+ public fun iterator ()Ljava/util/Iterator;
}
public final class space/kscience/kmath/nd/Structure1D$Companion {
}
-public final class space/kscience/kmath/nd/Structure1D$DefaultImpls {
- public static fun get (Lspace/kscience/kmath/nd/Structure1D;[I)Ljava/lang/Object;
- public static fun getDimension (Lspace/kscience/kmath/nd/Structure1D;)I
- public static fun iterator (Lspace/kscience/kmath/nd/Structure1D;)Ljava/util/Iterator;
-}
-
public final class space/kscience/kmath/nd/Structure1DKt {
public static final fun as1D (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructure1D;
public static final fun as1D (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/Structure1D;
@@ -1099,28 +949,19 @@ public final class space/kscience/kmath/nd/Structure1DKt {
public abstract interface class space/kscience/kmath/nd/Structure2D : space/kscience/kmath/nd/StructureND {
public static final field Companion Lspace/kscience/kmath/nd/Structure2D$Companion;
- public abstract fun elements ()Lkotlin/sequences/Sequence;
+ public fun elements ()Lkotlin/sequences/Sequence;
public abstract fun get (II)Ljava/lang/Object;
- public abstract fun get ([I)Ljava/lang/Object;
+ public fun get ([I)Ljava/lang/Object;
public abstract fun getColNum ()I
- public abstract fun getColumns ()Ljava/util/List;
+ public fun getColumns ()Ljava/util/List;
public abstract fun getRowNum ()I
- public abstract fun getRows ()Ljava/util/List;
- public abstract fun getShape ()[I
+ public fun getRows ()Ljava/util/List;
+ public fun getShape ()[I
}
public final class space/kscience/kmath/nd/Structure2D$Companion {
}
-public final class space/kscience/kmath/nd/Structure2D$DefaultImpls {
- public static fun elements (Lspace/kscience/kmath/nd/Structure2D;)Lkotlin/sequences/Sequence;
- public static fun get (Lspace/kscience/kmath/nd/Structure2D;[I)Ljava/lang/Object;
- public static fun getColumns (Lspace/kscience/kmath/nd/Structure2D;)Ljava/util/List;
- public static fun getDimension (Lspace/kscience/kmath/nd/Structure2D;)I
- public static fun getRows (Lspace/kscience/kmath/nd/Structure2D;)Ljava/util/List;
- public static fun getShape (Lspace/kscience/kmath/nd/Structure2D;)[I
-}
-
public final class space/kscience/kmath/nd/Structure2DKt {
public static final fun as2D (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructure2D;
public static final fun as2D (Lspace/kscience/kmath/nd/StructureND;)Lspace/kscience/kmath/nd/Structure2D;
@@ -1133,7 +974,7 @@ public abstract interface class space/kscience/kmath/nd/StructureND {
public static final field Companion Lspace/kscience/kmath/nd/StructureND$Companion;
public abstract fun elements ()Lkotlin/sequences/Sequence;
public abstract fun get ([I)Ljava/lang/Object;
- public abstract fun getDimension ()I
+ public fun getDimension ()I
public abstract fun getShape ()[I
}
@@ -1148,31 +989,18 @@ public final class space/kscience/kmath/nd/StructureND$Companion {
public final fun toString (Lspace/kscience/kmath/nd/StructureND;)Ljava/lang/String;
}
-public final class space/kscience/kmath/nd/StructureND$DefaultImpls {
- public static fun getDimension (Lspace/kscience/kmath/nd/StructureND;)I
-}
-
public final class space/kscience/kmath/nd/StructureNDKt {
public static final fun get (Lspace/kscience/kmath/nd/StructureND;[I)Ljava/lang/Object;
public static final fun mapInPlace (Lspace/kscience/kmath/nd/MutableStructureND;Lkotlin/jvm/functions/Function2;)V
}
public abstract interface class space/kscience/kmath/operations/Algebra {
- public abstract fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public abstract fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public abstract fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public abstract fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
-}
-
-public final class space/kscience/kmath/operations/Algebra$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/Algebra;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/Algebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/Algebra;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/Algebra;Ljava/lang/String;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/Algebra;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/Algebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
public abstract interface class space/kscience/kmath/operations/AlgebraElement {
@@ -1186,17 +1014,17 @@ public final class space/kscience/kmath/operations/AlgebraElementsKt {
}
public final class space/kscience/kmath/operations/AlgebraExtensionsKt {
- public static final fun abs (Lspace/kscience/kmath/operations/Group;Ljava/lang/Comparable;)Ljava/lang/Comparable;
- public static final fun average (Lspace/kscience/kmath/operations/Group;Ljava/lang/Iterable;)Ljava/lang/Object;
- public static final fun average (Lspace/kscience/kmath/operations/Group;Lkotlin/sequences/Sequence;)Ljava/lang/Object;
- public static final fun averageWith (Ljava/lang/Iterable;Lspace/kscience/kmath/operations/Group;)Ljava/lang/Object;
- public static final fun averageWith (Lkotlin/sequences/Sequence;Lspace/kscience/kmath/operations/Group;)Ljava/lang/Object;
+ public static final fun abs (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Comparable;)Ljava/lang/Comparable;
+ public static final fun average (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Iterable;)Ljava/lang/Object;
+ public static final fun average (Lspace/kscience/kmath/operations/Ring;Lkotlin/sequences/Sequence;)Ljava/lang/Object;
+ public static final fun averageWith (Ljava/lang/Iterable;Lspace/kscience/kmath/operations/Ring;)Ljava/lang/Object;
+ public static final fun averageWith (Lkotlin/sequences/Sequence;Lspace/kscience/kmath/operations/Ring;)Ljava/lang/Object;
public static final fun power (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;I)Ljava/lang/Object;
public static final fun power (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Object;I)Ljava/lang/Object;
- public static final fun sum (Lspace/kscience/kmath/operations/Group;Ljava/lang/Iterable;)Ljava/lang/Object;
- public static final fun sum (Lspace/kscience/kmath/operations/Group;Lkotlin/sequences/Sequence;)Ljava/lang/Object;
- public static final fun sumWith (Ljava/lang/Iterable;Lspace/kscience/kmath/operations/Group;)Ljava/lang/Object;
- public static final fun sumWith (Lkotlin/sequences/Sequence;Lspace/kscience/kmath/operations/Group;)Ljava/lang/Object;
+ public static final fun sum (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Iterable;)Ljava/lang/Object;
+ public static final fun sum (Lspace/kscience/kmath/operations/Ring;Lkotlin/sequences/Sequence;)Ljava/lang/Object;
+ public static final fun sumWith (Ljava/lang/Iterable;Lspace/kscience/kmath/operations/Ring;)Ljava/lang/Object;
+ public static final fun sumWith (Lkotlin/sequences/Sequence;Lspace/kscience/kmath/operations/Ring;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/AlgebraKt {
@@ -1242,62 +1070,22 @@ public final class space/kscience/kmath/operations/BigIntField : space/kscience/
public static final field INSTANCE Lspace/kscience/kmath/operations/BigIntField;
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun add (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun div (Lspace/kscience/kmath/operations/BigInt;Ljava/lang/Number;)Lspace/kscience/kmath/operations/BigInt;
- public fun div (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getOne ()Lspace/kscience/kmath/operations/BigInt;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun minus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Ljava/lang/Number;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Lspace/kscience/kmath/operations/BigInt;Ljava/lang/Number;)Lspace/kscience/kmath/operations/BigInt;
- public fun minus (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun plus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/lang/Number;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Lspace/kscience/kmath/operations/BigInt;Ljava/lang/Number;)Lspace/kscience/kmath/operations/BigInt;
- public fun plus (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Lspace/kscience/kmath/operations/BigInt;Ljava/lang/Number;)Lspace/kscience/kmath/operations/BigInt;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Lspace/kscience/kmath/operations/BigInt;D)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Number;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Lspace/kscience/kmath/operations/BigInt;Ljava/lang/Number;)Lspace/kscience/kmath/operations/BigInt;
- public fun times (Lspace/kscience/kmath/operations/BigInt;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public final fun unaryMinus (Ljava/lang/String;)Lspace/kscience/kmath/operations/BigInt;
public fun unaryMinus (Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
public final fun unaryPlus (Ljava/lang/String;)Lspace/kscience/kmath/operations/BigInt;
- public fun unaryPlus (Lspace/kscience/kmath/operations/BigInt;)Lspace/kscience/kmath/operations/BigInt;
}
public final class space/kscience/kmath/operations/BigIntKt {
@@ -1317,20 +1105,10 @@ public final class space/kscience/kmath/operations/ByteRing : space/kscience/kma
public static final field INSTANCE Lspace/kscience/kmath/operations/ByteRing;
public fun add (BB)Ljava/lang/Byte;
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;BB)Ljava/lang/Byte;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Byte;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Byte;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun getOne ()Ljava/lang/Byte;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getZero ()Ljava/lang/Byte;
public synthetic fun getZero ()Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;B)Ljava/lang/Byte;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun minus (BB)Ljava/lang/Byte;
public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (BB)Ljava/lang/Byte;
@@ -1341,18 +1119,10 @@ public final class space/kscience/kmath/operations/ByteRing : space/kscience/kma
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun plus (BB)Ljava/lang/Byte;
public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;BLjava/lang/Number;)Ljava/lang/Byte;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun times (BB)Ljava/lang/Byte;
public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (B)Ljava/lang/Byte;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;B)Ljava/lang/Byte;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public fun unaryPlus (B)Ljava/lang/Byte;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/DoubleField : space/kscience/kmath/operations/ExtendedField, space/kscience/kmath/operations/Norm, space/kscience/kmath/operations/ScaleOperations {
@@ -1371,20 +1141,12 @@ public final class space/kscience/kmath/operations/DoubleField : space/kscience/
public synthetic fun atan (Ljava/lang/Object;)Ljava/lang/Object;
public fun atanh (D)Ljava/lang/Double;
public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;DD)Ljava/lang/Double;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Double;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Double;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun cos (D)Ljava/lang/Double;
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
public fun cosh (D)Ljava/lang/Double;
public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
public fun div (DD)Ljava/lang/Double;
- public fun div (DLjava/lang/Number;)Ljava/lang/Double;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide (DD)Ljava/lang/Double;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
@@ -1394,9 +1156,6 @@ public final class space/kscience/kmath/operations/DoubleField : space/kscience/
public synthetic fun getOne ()Ljava/lang/Object;
public fun getZero ()Ljava/lang/Double;
public synthetic fun getZero ()Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;D)Ljava/lang/Double;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun ln (D)Ljava/lang/Double;
public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
public fun minus (DD)Ljava/lang/Double;
@@ -1409,38 +1168,22 @@ public final class space/kscience/kmath/operations/DoubleField : space/kscience/
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun plus (DD)Ljava/lang/Double;
public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun pow (DLjava/lang/Number;)Ljava/lang/Double;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power (DLjava/lang/Number;)Ljava/lang/Double;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;DLjava/lang/Number;)Ljava/lang/Double;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun scale (DD)Ljava/lang/Double;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun sin (D)Ljava/lang/Double;
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
public fun sinh (D)Ljava/lang/Double;
public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun sqrt (D)Ljava/lang/Double;
- public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
public fun tan (D)Ljava/lang/Double;
public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
public fun tanh (D)Ljava/lang/Double;
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun times (DD)Ljava/lang/Double;
- public fun times (DLjava/lang/Number;)Ljava/lang/Double;
- public fun times (Ljava/lang/Number;D)Ljava/lang/Double;
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (D)Ljava/lang/Double;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;D)Ljava/lang/Double;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public fun unaryPlus (D)Ljava/lang/Double;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
}
public abstract interface class space/kscience/kmath/operations/ExponentialOperations : space/kscience/kmath/operations/Algebra {
@@ -1474,112 +1217,32 @@ public final class space/kscience/kmath/operations/ExponentialOperations$Compani
public static final field TANH_OPERATION Ljava/lang/String;
}
-public final class space/kscience/kmath/operations/ExponentialOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/ExponentialOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/ExponentialOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/ExponentialOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/ExponentialOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/ExponentialOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/ExponentialOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
-}
-
public abstract interface class space/kscience/kmath/operations/ExtendedField : space/kscience/kmath/operations/ExtendedFieldOperations, space/kscience/kmath/operations/Field, space/kscience/kmath/operations/NumericAlgebra, space/kscience/kmath/operations/ScaleOperations {
- public abstract fun acosh (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun asinh (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public abstract fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public abstract fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
-}
-
-public final class space/kscience/kmath/operations/ExtendedField$DefaultImpls {
- public static fun acosh (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun asinh (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun atanh (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperation (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;)Ljava/lang/Object;
- public static fun cosh (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun leftSideNumberOperation (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun leftSideNumberOperationFunction (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun minus (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun number (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun pow (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun rightSideNumberOperation (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun rightSideNumberOperationFunction (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun sinh (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun sqrt (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun tan (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun tanh (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/ExtendedField;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun acosh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun asinh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
+ public fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
}
public abstract interface class space/kscience/kmath/operations/ExtendedFieldOperations : space/kscience/kmath/operations/ExponentialOperations, space/kscience/kmath/operations/FieldOperations, space/kscience/kmath/operations/PowerOperations, space/kscience/kmath/operations/TrigonometricOperations {
- public abstract fun tan (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
-}
-
-public final class space/kscience/kmath/operations/ExtendedFieldOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun pow (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun sqrt (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun tan (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun tanh (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/ExtendedFieldOperations;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun tan (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
}
public abstract interface class space/kscience/kmath/operations/Field : space/kscience/kmath/operations/FieldOperations, space/kscience/kmath/operations/NumericAlgebra, space/kscience/kmath/operations/Ring, space/kscience/kmath/operations/ScaleOperations {
- public abstract fun number (Ljava/lang/Number;)Ljava/lang/Object;
-}
-
-public final class space/kscience/kmath/operations/Field$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun leftSideNumberOperation (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun leftSideNumberOperationFunction (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun minus (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun number (Lspace/kscience/kmath/operations/Field;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun rightSideNumberOperation (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun rightSideNumberOperationFunction (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun times (Lspace/kscience/kmath/operations/Field;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/Field;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/Field;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun number (Ljava/lang/Number;)Ljava/lang/Object;
}
public abstract interface class space/kscience/kmath/operations/FieldOperations : space/kscience/kmath/operations/RingOperations {
public static final field Companion Lspace/kscience/kmath/operations/FieldOperations$Companion;
public static final field DIV_OPERATION Ljava/lang/String;
- public abstract fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public abstract fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public abstract fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
}
@@ -1587,20 +1250,6 @@ public final class space/kscience/kmath/operations/FieldOperations$Companion {
public static final field DIV_OPERATION Ljava/lang/String;
}
-public final class space/kscience/kmath/operations/FieldOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/FieldOperations;Ljava/lang/Object;)Ljava/lang/Object;
-}
-
public final class space/kscience/kmath/operations/FloatField : space/kscience/kmath/operations/ExtendedField, space/kscience/kmath/operations/Norm {
public static final field INSTANCE Lspace/kscience/kmath/operations/FloatField;
public fun acos (F)Ljava/lang/Float;
@@ -1617,20 +1266,12 @@ public final class space/kscience/kmath/operations/FloatField : space/kscience/k
public synthetic fun atan (Ljava/lang/Object;)Ljava/lang/Object;
public fun atanh (F)Ljava/lang/Float;
public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;FF)Ljava/lang/Float;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Float;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Float;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun cos (F)Ljava/lang/Float;
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
public fun cosh (F)Ljava/lang/Float;
public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
public fun div (FF)Ljava/lang/Float;
- public fun div (FLjava/lang/Number;)Ljava/lang/Float;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide (FF)Ljava/lang/Float;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
@@ -1640,9 +1281,6 @@ public final class space/kscience/kmath/operations/FloatField : space/kscience/k
public synthetic fun getOne ()Ljava/lang/Object;
public fun getZero ()Ljava/lang/Float;
public synthetic fun getZero ()Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;F)Ljava/lang/Float;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun ln (F)Ljava/lang/Float;
public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
public fun minus (FF)Ljava/lang/Float;
@@ -1655,67 +1293,39 @@ public final class space/kscience/kmath/operations/FloatField : space/kscience/k
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun plus (FF)Ljava/lang/Float;
public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun pow (FLjava/lang/Number;)Ljava/lang/Float;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power (FLjava/lang/Number;)Ljava/lang/Float;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;FLjava/lang/Number;)Ljava/lang/Float;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun scale (FD)Ljava/lang/Float;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun sin (F)Ljava/lang/Float;
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
public fun sinh (F)Ljava/lang/Float;
public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
- public fun sqrt (F)Ljava/lang/Float;
- public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
public fun tan (F)Ljava/lang/Float;
public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
public fun tanh (F)Ljava/lang/Float;
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun times (FF)Ljava/lang/Float;
- public fun times (FLjava/lang/Number;)Ljava/lang/Float;
- public fun times (Ljava/lang/Number;F)Ljava/lang/Float;
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (F)Ljava/lang/Float;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;F)Ljava/lang/Float;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public fun unaryPlus (F)Ljava/lang/Float;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
}
public abstract interface class space/kscience/kmath/operations/Group : space/kscience/kmath/operations/GroupOperations {
public abstract fun getZero ()Ljava/lang/Object;
}
-public final class space/kscience/kmath/operations/Group$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/Group;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/Group;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/Group;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/Group;Ljava/lang/String;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/Group;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/Group;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/Group;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/Group;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/Group;Ljava/lang/Object;)Ljava/lang/Object;
-}
-
public abstract interface class space/kscience/kmath/operations/GroupOperations : space/kscience/kmath/operations/Algebra {
public static final field Companion Lspace/kscience/kmath/operations/GroupOperations$Companion;
public static final field MINUS_OPERATION Ljava/lang/String;
public static final field PLUS_OPERATION Ljava/lang/String;
public abstract fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public abstract fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public abstract fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public abstract fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/GroupOperations$Companion {
@@ -1723,36 +1333,14 @@ public final class space/kscience/kmath/operations/GroupOperations$Companion {
public static final field PLUS_OPERATION Ljava/lang/String;
}
-public final class space/kscience/kmath/operations/GroupOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/GroupOperations;Ljava/lang/Object;)Ljava/lang/Object;
-}
-
public final class space/kscience/kmath/operations/IntRing : space/kscience/kmath/operations/Norm, space/kscience/kmath/operations/NumericAlgebra, space/kscience/kmath/operations/Ring {
public static final field INSTANCE Lspace/kscience/kmath/operations/IntRing;
public fun add (II)Ljava/lang/Integer;
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;II)Ljava/lang/Integer;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Integer;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Integer;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun getOne ()Ljava/lang/Integer;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getZero ()Ljava/lang/Integer;
public synthetic fun getZero ()Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;I)Ljava/lang/Integer;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun minus (II)Ljava/lang/Integer;
public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (II)Ljava/lang/Integer;
@@ -1763,18 +1351,10 @@ public final class space/kscience/kmath/operations/IntRing : space/kscience/kmat
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun plus (II)Ljava/lang/Integer;
public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;ILjava/lang/Number;)Ljava/lang/Integer;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun times (II)Ljava/lang/Integer;
public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (I)Ljava/lang/Integer;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;I)Ljava/lang/Integer;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public fun unaryPlus (I)Ljava/lang/Integer;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/JBigDecimalField : space/kscience/kmath/operations/JBigDecimalFieldBase {
@@ -1791,98 +1371,44 @@ public abstract class space/kscience/kmath/operations/JBigDecimalFieldBase : spa
public fun ()V
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun add (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Ljava/math/BigDecimal;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/math/BigDecimal;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun div (Ljava/math/BigDecimal;Ljava/lang/Number;)Ljava/math/BigDecimal;
- public fun div (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getOne ()Ljava/math/BigDecimal;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Ljava/math/BigDecimal;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun minus (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Ljava/math/BigDecimal;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun pow (Ljava/math/BigDecimal;Ljava/lang/Number;)Ljava/math/BigDecimal;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power (Ljava/math/BigDecimal;Ljava/lang/Number;)Ljava/math/BigDecimal;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Ljava/math/BigDecimal;Ljava/lang/Number;)Ljava/math/BigDecimal;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale (Ljava/math/BigDecimal;D)Ljava/math/BigDecimal;
public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
public fun sqrt (Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Number;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/math/BigDecimal;Ljava/lang/Number;)Ljava/math/BigDecimal;
- public fun times (Ljava/math/BigDecimal;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
}
public final class space/kscience/kmath/operations/JBigIntegerField : space/kscience/kmath/operations/NumericAlgebra, space/kscience/kmath/operations/Ring {
public static final field INSTANCE Lspace/kscience/kmath/operations/JBigIntegerField;
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun add (Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Ljava/math/BigInteger;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/math/BigInteger;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getOne ()Ljava/math/BigInteger;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Ljava/math/BigInteger;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/math/BigInteger;)Ljava/math/BigInteger;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun minus (Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Ljava/math/BigInteger;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Ljava/math/BigInteger;Ljava/lang/Number;)Ljava/math/BigInteger;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (Ljava/math/BigInteger;)Ljava/math/BigInteger;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Ljava/math/BigInteger;)Ljava/math/BigInteger;
}
public abstract interface annotation class space/kscience/kmath/operations/KMathContext : java/lang/annotation/Annotation {
@@ -1892,20 +1418,10 @@ public final class space/kscience/kmath/operations/LongRing : space/kscience/kma
public static final field INSTANCE Lspace/kscience/kmath/operations/LongRing;
public fun add (JJ)Ljava/lang/Long;
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;JJ)Ljava/lang/Long;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Long;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Long;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
public fun getOne ()Ljava/lang/Long;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getZero ()Ljava/lang/Long;
public synthetic fun getZero ()Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;J)Ljava/lang/Long;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun minus (JJ)Ljava/lang/Long;
public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply (JJ)Ljava/lang/Long;
@@ -1916,64 +1432,23 @@ public final class space/kscience/kmath/operations/LongRing : space/kscience/kma
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun plus (JJ)Ljava/lang/Long;
public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;JLjava/lang/Number;)Ljava/lang/Long;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public fun times (JJ)Ljava/lang/Long;
public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (J)Ljava/lang/Long;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;J)Ljava/lang/Long;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public fun unaryPlus (J)Ljava/lang/Long;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
}
public abstract interface class space/kscience/kmath/operations/Norm {
public abstract fun norm (Ljava/lang/Object;)Ljava/lang/Object;
}
-public final class space/kscience/kmath/operations/NumbersAddOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun leftSideNumberOperation (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun leftSideNumberOperationFunction (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun minus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun rightSideNumberOperation (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun rightSideNumberOperationFunction (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/NumbersAddOperations;Ljava/lang/Object;)Ljava/lang/Object;
-}
-
public abstract interface class space/kscience/kmath/operations/NumericAlgebra : space/kscience/kmath/operations/Algebra {
- public abstract fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public abstract fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
+ public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public abstract fun number (Ljava/lang/Number;)Ljava/lang/Object;
- public abstract fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public abstract fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
-}
-
-public final class space/kscience/kmath/operations/NumericAlgebra$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;)Ljava/lang/Object;
- public static fun leftSideNumberOperation (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun leftSideNumberOperationFunction (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun rightSideNumberOperation (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun rightSideNumberOperationFunction (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/NumericAlgebra;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
+ public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
}
public final class space/kscience/kmath/operations/NumericAlgebraKt {
@@ -1988,9 +1463,9 @@ public abstract interface class space/kscience/kmath/operations/PowerOperations
public static final field Companion Lspace/kscience/kmath/operations/PowerOperations$Companion;
public static final field POW_OPERATION Ljava/lang/String;
public static final field SQRT_OPERATION Ljava/lang/String;
- public abstract fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
+ public fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public abstract fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public abstract fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
+ public fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/PowerOperations$Companion {
@@ -1998,96 +1473,37 @@ public final class space/kscience/kmath/operations/PowerOperations$Companion {
public static final field SQRT_OPERATION Ljava/lang/String;
}
-public final class space/kscience/kmath/operations/PowerOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun pow (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun sqrt (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/PowerOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
-}
-
public abstract interface class space/kscience/kmath/operations/Ring : space/kscience/kmath/operations/Group, space/kscience/kmath/operations/RingOperations {
public abstract fun getOne ()Ljava/lang/Object;
}
-public final class space/kscience/kmath/operations/Ring$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/Ring;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/Ring;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/Ring;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/Ring;Ljava/lang/String;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/Ring;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/Ring;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/Ring;Ljava/lang/Object;)Ljava/lang/Object;
-}
-
public abstract interface class space/kscience/kmath/operations/RingOperations : space/kscience/kmath/operations/GroupOperations {
public static final field Companion Lspace/kscience/kmath/operations/RingOperations$Companion;
public static final field TIMES_OPERATION Ljava/lang/String;
- public abstract fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
+ public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public abstract fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/RingOperations$Companion {
public static final field TIMES_OPERATION Ljava/lang/String;
}
-public final class space/kscience/kmath/operations/RingOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun minus (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun plus (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public static fun unaryPlus (Lspace/kscience/kmath/operations/RingOperations;Ljava/lang/Object;)Ljava/lang/Object;
-}
-
public abstract interface class space/kscience/kmath/operations/ScaleOperations : space/kscience/kmath/operations/Algebra {
- public abstract fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
+ public fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public abstract fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
- public abstract fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public abstract fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
-}
-
-public final class space/kscience/kmath/operations/ScaleOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun div (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun times (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/ScaleOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
+ public fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
+ public fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
}
public final class space/kscience/kmath/operations/ShortRing : space/kscience/kmath/operations/Norm, space/kscience/kmath/operations/NumericAlgebra, space/kscience/kmath/operations/Ring {
public static final field INSTANCE Lspace/kscience/kmath/operations/ShortRing;
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun add (SS)Ljava/lang/Short;
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;SS)Ljava/lang/Short;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Ljava/lang/Short;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Short;
public synthetic fun getOne ()Ljava/lang/Object;
public fun getOne ()Ljava/lang/Short;
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Ljava/lang/Short;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;S)Ljava/lang/Short;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun minus (SS)Ljava/lang/Short;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
@@ -2098,18 +1514,10 @@ public final class space/kscience/kmath/operations/ShortRing : space/kscience/km
public fun number (Ljava/lang/Number;)Ljava/lang/Short;
public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun plus (SS)Ljava/lang/Short;
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;SLjava/lang/Number;)Ljava/lang/Short;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun times (SS)Ljava/lang/Short;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (S)Ljava/lang/Short;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;S)Ljava/lang/Short;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (S)Ljava/lang/Short;
}
public abstract interface class space/kscience/kmath/operations/TrigonometricOperations : space/kscience/kmath/operations/Algebra {
@@ -2137,15 +1545,6 @@ public final class space/kscience/kmath/operations/TrigonometricOperations$Compa
public static final field TAN_OPERATION Ljava/lang/String;
}
-public final class space/kscience/kmath/operations/TrigonometricOperations$DefaultImpls {
- public static fun binaryOperation (Lspace/kscience/kmath/operations/TrigonometricOperations;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun binaryOperationFunction (Lspace/kscience/kmath/operations/TrigonometricOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public static fun bindSymbol (Lspace/kscience/kmath/operations/TrigonometricOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun bindSymbolOrNull (Lspace/kscience/kmath/operations/TrigonometricOperations;Ljava/lang/String;)Ljava/lang/Object;
- public static fun unaryOperation (Lspace/kscience/kmath/operations/TrigonometricOperations;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public static fun unaryOperationFunction (Lspace/kscience/kmath/operations/TrigonometricOperations;Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
-}
-
public final class space/kscience/kmath/structures/ArrayBuffer : space/kscience/kmath/structures/MutableBuffer {
public fun ([Ljava/lang/Object;)V
public fun copy ()Lspace/kscience/kmath/structures/MutableBuffer;
@@ -2169,7 +1568,7 @@ public final class space/kscience/kmath/structures/Buffer$Companion {
}
public final class space/kscience/kmath/structures/BufferKt {
- public static final fun asBuffer (Ljava/util/List;)Ljava/util/List;
+ public static final fun asBuffer (Ljava/util/List;)Lspace/kscience/kmath/structures/ListBuffer;
public static final fun asBuffer ([Ljava/lang/Object;)Lspace/kscience/kmath/structures/ArrayBuffer;
public static final fun asMutableBuffer (Ljava/util/List;)Ljava/util/List;
public static final fun asReadOnly (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
@@ -2180,6 +1579,7 @@ public final class space/kscience/kmath/structures/BufferOperationKt {
public static final fun asIterable (Lspace/kscience/kmath/structures/Buffer;)Ljava/lang/Iterable;
public static final fun asSequence (Lspace/kscience/kmath/structures/Buffer;)Lkotlin/sequences/Sequence;
public static final fun fold (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
+ public static final fun map (Lspace/kscience/kmath/structures/Buffer;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/structures/Buffer;
public static final fun toList (Lspace/kscience/kmath/structures/Buffer;)Ljava/util/List;
}
@@ -2227,21 +1627,10 @@ public final class space/kscience/kmath/structures/DoubleBufferField : space/ksc
public fun atan-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun atanh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
public fun cos-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
public fun cosh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun div (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)Lspace/kscience/kmath/structures/Buffer;
- public fun div (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun exp (Ljava/lang/Object;)Ljava/lang/Object;
@@ -2251,51 +1640,26 @@ public final class space/kscience/kmath/structures/DoubleBufferField : space/ksc
public final fun getSize ()I
public synthetic fun getZero ()Ljava/lang/Object;
public fun getZero ()Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun leftSideNumberOperation (Ljava/lang/String;Ljava/lang/Number;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
public fun ln-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
public fun number (Ljava/lang/Number;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun pow (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)[D
- public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun rightSideNumberOperation (Ljava/lang/String;Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)Lspace/kscience/kmath/structures/Buffer;
- public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
public synthetic fun scale (Ljava/lang/Object;D)Ljava/lang/Object;
public fun scale-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;D)[D
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
public fun sin-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
public fun sinh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
- public fun sqrt (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
public fun tan-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun tanh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Ljava/lang/Number;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)Lspace/kscience/kmath/structures/Buffer;
- public fun times (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
}
public final class space/kscience/kmath/structures/DoubleBufferFieldOperations : space/kscience/kmath/operations/ExtendedFieldOperations {
@@ -2314,54 +1678,30 @@ public final class space/kscience/kmath/structures/DoubleBufferFieldOperations :
public fun atan-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun atanh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun binaryOperation (Ljava/lang/String;Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
- public synthetic fun bindSymbol (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbol (Ljava/lang/String;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun bindSymbolOrNull (Ljava/lang/String;)Ljava/lang/Object;
- public fun bindSymbolOrNull (Ljava/lang/String;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
public fun cos-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
public fun cosh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun div (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun div (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun divide-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun exp (Ljava/lang/Object;)Ljava/lang/Object;
public fun exp-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
public fun ln-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun minus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun minus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public fun multiply-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun plus (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun plus (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
- public fun pow (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
public fun power-CZ9oacQ (Lspace/kscience/kmath/structures/Buffer;Ljava/lang/Number;)[D
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
public fun sin-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
public fun sinh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
- public fun sqrt (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
public fun tan-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
public fun tanh-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun times (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- public fun times (Lspace/kscience/kmath/structures/Buffer;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
public fun unaryMinus-Udx-57Q (Lspace/kscience/kmath/structures/Buffer;)[D
- public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryOperation (Ljava/lang/String;Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
- public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
- public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
- public fun unaryPlus (Lspace/kscience/kmath/structures/Buffer;)Lspace/kscience/kmath/structures/Buffer;
}
public final class space/kscience/kmath/structures/DoubleBufferKt {
@@ -2463,23 +1803,12 @@ public final class space/kscience/kmath/structures/IntBufferKt {
}
public final class space/kscience/kmath/structures/ListBuffer : space/kscience/kmath/structures/Buffer {
- public static final synthetic fun box-impl (Ljava/util/List;)Lspace/kscience/kmath/structures/ListBuffer;
- public static fun constructor-impl (Ljava/util/List;)Ljava/util/List;
- public fun equals (Ljava/lang/Object;)Z
- public static fun equals-impl (Ljava/util/List;Ljava/lang/Object;)Z
- public static final fun equals-impl0 (Ljava/util/List;Ljava/util/List;)Z
+ public fun (ILkotlin/jvm/functions/Function1;)V
+ public fun (Ljava/util/List;)V
public fun get (I)Ljava/lang/Object;
- public static fun get-impl (Ljava/util/List;I)Ljava/lang/Object;
public final fun getList ()Ljava/util/List;
public fun getSize ()I
- public static fun getSize-impl (Ljava/util/List;)I
- public fun hashCode ()I
- public static fun hashCode-impl (Ljava/util/List;)I
public fun iterator ()Ljava/util/Iterator;
- public static fun iterator-impl (Ljava/util/List;)Ljava/util/Iterator;
- public fun toString ()Ljava/lang/String;
- public static fun toString-impl (Ljava/util/List;)Ljava/lang/String;
- public final synthetic fun unbox-impl ()Ljava/util/List;
}
public final class space/kscience/kmath/structures/LongBuffer : space/kscience/kmath/structures/MutableBuffer {
@@ -2549,6 +1878,7 @@ public final class space/kscience/kmath/structures/MutableBuffer$Companion {
public final class space/kscience/kmath/structures/MutableListBuffer : space/kscience/kmath/structures/MutableBuffer {
public static final synthetic fun box-impl (Ljava/util/List;)Lspace/kscience/kmath/structures/MutableListBuffer;
+ public static fun constructor-impl (ILkotlin/jvm/functions/Function1;)Ljava/util/List;
public static fun constructor-impl (Ljava/util/List;)Ljava/util/List;
public fun copy ()Lspace/kscience/kmath/structures/MutableBuffer;
public static fun copy-impl (Ljava/util/List;)Lspace/kscience/kmath/structures/MutableBuffer;
diff --git a/kmath-core/build.gradle.kts b/kmath-core/build.gradle.kts
index 2fed3eb2f..92a5f419d 100644
--- a/kmath-core/build.gradle.kts
+++ b/kmath-core/build.gradle.kts
@@ -1,7 +1,6 @@
-import ru.mipt.npm.gradle.Maturity
-
plugins {
- id("ru.mipt.npm.gradle.mpp")
+ kotlin("multiplatform")
+ id("ru.mipt.npm.gradle.common")
id("ru.mipt.npm.gradle.native")
}
@@ -15,7 +14,7 @@ kotlin.sourceSets {
readme {
description = "Core classes, algebra definitions, basic linear algebra"
- maturity = Maturity.DEVELOPMENT
+ maturity = ru.mipt.npm.gradle.Maturity.DEVELOPMENT
propertyByTemplate("artifact", rootProject.file("docs/templates/ARTIFACT-TEMPLATE.md"))
feature(
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/ColumnarData.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/ColumnarData.kt
index 761255158..abbb46583 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/ColumnarData.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/ColumnarData.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.data
import space.kscience.kmath.misc.Symbol
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYColumnarData.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYColumnarData.kt
index 15239bca1..663908e90 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYColumnarData.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYColumnarData.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.data
import space.kscience.kmath.misc.Symbol
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYZColumnarData.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYZColumnarData.kt
index f74c6e2d6..d76a44e9e 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYZColumnarData.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/data/XYZColumnarData.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.data
import space.kscience.kmath.misc.Symbol
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/Domain.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/Domain.kt
index edf19de55..e6e703cbf 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/Domain.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/Domain.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.domains
import space.kscience.kmath.linear.Point
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/DoubleDomain.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/DoubleDomain.kt
index 154763159..ee1bebde0 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/DoubleDomain.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/DoubleDomain.kt
@@ -1,17 +1,6 @@
-/*
- * Copyright 2015 Alexander Nozik.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.domains
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/HyperSquareDomain.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/HyperSquareDomain.kt
index a15d04b4c..f5560d935 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/HyperSquareDomain.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/HyperSquareDomain.kt
@@ -1,17 +1,6 @@
-/*
- * Copyright 2015 Alexander Nozik.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.domains
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnconstrainedDomain.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnconstrainedDomain.kt
index 79f33fe05..7ffc0659d 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnconstrainedDomain.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnconstrainedDomain.kt
@@ -1,17 +1,6 @@
-/*
- * Copyright 2015 Alexander Nozik.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.domains
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnivariateDomain.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnivariateDomain.kt
index 6f737bd38..e7acada85 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnivariateDomain.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains/UnivariateDomain.kt
@@ -1,10 +1,15 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.domains
import space.kscience.kmath.linear.Point
import space.kscience.kmath.misc.UnstableKMathAPI
@UnstableKMathAPI
-public inline class UnivariateDomain(public val range: ClosedFloatingPointRange) : DoubleDomain {
+public class UnivariateDomain(public val range: ClosedFloatingPointRange) : DoubleDomain {
public override val dimension: Int get() = 1
public operator fun contains(d: Double): Boolean = range.contains(d)
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/DifferentiableExpression.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/DifferentiableExpression.kt
index 1f0ceaec3..dbc1431b3 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/DifferentiableExpression.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/DifferentiableExpression.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.expressions
import space.kscience.kmath.misc.StringSymbol
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Expression.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Expression.kt
index fc49a0fae..a9ab8648f 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Expression.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Expression.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.expressions
import space.kscience.kmath.misc.StringSymbol
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt
index 9fb8f28c8..994d52a73 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.expressions
import space.kscience.kmath.misc.StringSymbol
@@ -44,7 +49,7 @@ public abstract class FunctionalExpressionAlgebra>(
}
/**
- * A context class for [Expression] construction for [Group] algebras.
+ * A context class for [Expression] construction for [Ring] algebras.
*/
public open class FunctionalExpressionGroup>(
algebra: A,
@@ -168,7 +173,7 @@ public open class FunctionalExpressionExtendedField>(
public override fun bindSymbol(value: String): Expression = super.bindSymbol(value)
}
-public inline fun > A.expressionInSpace(block: FunctionalExpressionGroup.() -> Expression): Expression =
+public inline fun > A.expressionInSpace(block: FunctionalExpressionGroup.() -> Expression): Expression =
FunctionalExpressionGroup(this).block()
public inline fun > A.expressionInRing(block: FunctionalExpressionRing.() -> Expression): Expression =
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MST.kt
similarity index 95%
rename from kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt
rename to kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MST.kt
index 538db0caa..67881d9af 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MST.kt
@@ -1,6 +1,10 @@
-package space.kscience.kmath.ast
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.expressions
-import space.kscience.kmath.expressions.Expression
import space.kscience.kmath.misc.StringSymbol
import space.kscience.kmath.misc.Symbol
import space.kscience.kmath.operations.Algebra
diff --git a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt
similarity index 97%
rename from kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt
rename to kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt
index 33fca7521..32a7efc1e 100644
--- a/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt
@@ -1,4 +1,9 @@
-package space.kscience.kmath.ast
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package space.kscience.kmath.expressions
import space.kscience.kmath.misc.UnstableKMathAPI
import space.kscience.kmath.operations.*
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt
index a832daa14..09a5faa12 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.expressions
import space.kscience.kmath.linear.Point
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt
index 4db4b5828..886008983 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SymbolIndexer.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.expressions
import space.kscience.kmath.linear.Point
@@ -5,6 +10,7 @@ import space.kscience.kmath.misc.Symbol
import space.kscience.kmath.misc.UnstableKMathAPI
import space.kscience.kmath.nd.Structure2D
import space.kscience.kmath.structures.BufferFactory
+import kotlin.jvm.JvmInline
/**
* An environment to easy transform indexed variables to symbols and back.
@@ -53,7 +59,8 @@ public interface SymbolIndexer {
}
@UnstableKMathAPI
-public inline class SimpleSymbolIndexer(override val symbols: List) : SymbolIndexer
+@JvmInline
+public value class SimpleSymbolIndexer(override val symbols: List) : SymbolIndexer
/**
* Execute the block with symbol indexer based on given symbol order
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/expressionBuilders.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/expressionBuilders.kt
index fbf080032..142194070 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/expressionBuilders.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/expressionBuilders.kt
@@ -1,17 +1,21 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.expressions
import space.kscience.kmath.operations.ExtendedField
import space.kscience.kmath.operations.Field
-import space.kscience.kmath.operations.Group
import space.kscience.kmath.operations.Ring
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
/**
- * Creates a functional expression with this [Group].
+ * Creates a functional expression with this [Ring].
*/
-public inline fun Group.spaceExpression(block: FunctionalExpressionGroup>.() -> Expression): Expression {
+public inline fun Ring.spaceExpression(block: FunctionalExpressionGroup>.() -> Expression): Expression {
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
return FunctionalExpressionGroup(this).block()
}
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/BufferedLinearSpace.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/BufferedLinearSpace.kt
index 662cd6409..62d2408e3 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/BufferedLinearSpace.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/BufferedLinearSpace.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.nd.*
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSolver.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSolver.kt
index 3e2dbee3f..9c3ffd819 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSolver.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSolver.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.nd.as1D
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSpace.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSpace.kt
index 21094db73..ec073ac48 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSpace.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LinearSpace.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.misc.UnstableKMathAPI
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LupDecomposition.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LupDecomposition.kt
index 7a6495638..f3653d394 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LupDecomposition.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/LupDecomposition.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.misc.UnstableKMathAPI
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixBuilder.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixBuilder.kt
index b30d621fe..e6115a1e5 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixBuilder.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixBuilder.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.misc.UnstableKMathAPI
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixFeatures.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixFeatures.kt
index 30e3daa7a..4a0ca7dfe 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixFeatures.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixFeatures.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.nd.StructureFeature
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixWrapper.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixWrapper.kt
index def3b87f7..4d1180c17 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixWrapper.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/MatrixWrapper.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
import space.kscience.kmath.misc.UnstableKMathAPI
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/VirtualMatrix.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/VirtualMatrix.kt
index e80ee5ebd..e4c2b49f0 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/VirtualMatrix.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/linear/VirtualMatrix.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.linear
/**
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/Symbol.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/Symbol.kt
index 2c9774b6a..737acc025 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/Symbol.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/Symbol.kt
@@ -1,5 +1,11 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.misc
+import kotlin.jvm.JvmInline
import kotlin.properties.ReadOnlyProperty
/**
@@ -21,7 +27,8 @@ public interface Symbol {
/**
* A [Symbol] with a [String] identity
*/
-public inline class StringSymbol(override val identity: String) : Symbol {
+@JvmInline
+public value class StringSymbol(override val identity: String) : Symbol {
override fun toString(): String = identity
}
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/annotations.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/annotations.kt
index 7fd7b433d..206e4e000 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/annotations.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/annotations.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.misc
@RequiresOptIn("This API is unstable and could change in future", RequiresOptIn.Level.WARNING)
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/cumulative.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/cumulative.kt
index 6466695a6..889eb4f22 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/cumulative.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/misc/cumulative.kt
@@ -1,6 +1,11 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.misc
-import space.kscience.kmath.operations.Group
+import space.kscience.kmath.operations.Ring
import space.kscience.kmath.operations.invoke
import kotlin.jvm.JvmName
@@ -37,7 +42,7 @@ public fun List.cumulative(initial: R, operation: (R, T) -> R): List Iterable.cumulativeSum(group: Group): Iterable =
+public fun Iterable.cumulativeSum(group: Ring): Iterable =
group { cumulative(zero) { element: T, sum: T -> sum + element } }
@JvmName("cumulativeSumOfDouble")
@@ -49,7 +54,7 @@ public fun Iterable.cumulativeSum(): Iterable = cumulative(0) { elemen
@JvmName("cumulativeSumOfLong")
public fun Iterable.cumulativeSum(): Iterable = cumulative(0L) { element, sum -> sum + element }
-public fun Sequence.cumulativeSum(group: Group): Sequence =
+public fun Sequence.cumulativeSum(group: Ring): Sequence =
group { cumulative(zero) { element: T, sum: T -> sum + element } }
@JvmName("cumulativeSumOfDouble")
@@ -61,7 +66,7 @@ public fun Sequence.cumulativeSum(): Sequence = cumulative(0) { elemen
@JvmName("cumulativeSumOfLong")
public fun Sequence.cumulativeSum(): Sequence = cumulative(0L) { element, sum -> sum + element }
-public fun List.cumulativeSum(group: Group): List =
+public fun List.cumulativeSum(group: Ring): List =
group { cumulative(zero) { element: T, sum: T -> sum + element } }
@JvmName("cumulativeSumOfDouble")
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/AlgebraND.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/AlgebraND.kt
index b5aa56bd3..1b3cb9e0a 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/AlgebraND.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/AlgebraND.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.nd
import space.kscience.kmath.misc.UnstableKMathAPI
diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/BufferAlgebraND.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/BufferAlgebraND.kt
index 67e94df74..905a48d5c 100644
--- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/BufferAlgebraND.kt
+++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/BufferAlgebraND.kt
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2018-2021 KMath contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
package space.kscience.kmath.nd
import space.kscience.kmath.operations.*
@@ -80,13 +85,13 @@ public open class BufferedFieldND>(
}
// group factories
-public fun > AlgebraND.Companion.group(
+public fun > AlgebraND.Companion.group(
space: A,
bufferFactory: BufferFactory,
vararg shape: Int,
): BufferedGroupND = BufferedGroupND(shape, space, bufferFactory)
-public inline fun