diff --git a/kmath-ast/index.html b/kmath-ast/index.html index fb57865c8..97ae98bcd 100644 --- a/kmath-ast/index.html +++ b/kmath-ast/index.html @@ -24,7 +24,7 @@
Performance and visualization extensions to MST API.
src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt : Expression language and its parser
src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt : Dynamic MST to JVM bytecode compiler
src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt : Dynamic MST to JS compiler
src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt : Extendable MST rendering
The Maven coordinates of this project are space.kscience:kmath-ast:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-ast:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-ast:0.3.0-dev-16")
}
kmath-ast
JVM module supports runtime code generation to eliminate overhead of tree traversal. Code generator builds a special implementation of Expression<T>
with implemented invoke
function.
For example, the following builder:
import space.kscience.kmath.expressions.Symbol.Companion.x
import space.kscience.kmath.expressions.*
import space.kscience.kmath.operations.*
import space.kscience.kmath.asm.*
MstField { x + 2 }.compileToExpression(DoubleField)
... leads to generation of bytecode, which can be decompiled to the following Java class:
package space.kscience.kmath.asm.generated;
import java.util.Map;
import kotlin.jvm.functions.Function2;
import space.kscience.kmath.asm.internal.MapIntrinsics;
import space.kscience.kmath.expressions.Expression;
import space.kscience.kmath.expressions.Symbol;
public final class AsmCompiledExpression_45045_0 implements Expression<Double> {
private final Object[] constants;
public final Double invoke(Map<Symbol, ? extends Double> arguments) {
return (Double) ((Function2) this.constants[0]).invoke((Double) MapIntrinsics.getOrFail(arguments, "x"), 2);
}
public AsmCompiledExpression_45045_0(Object[] constants) {
this.constants = constants;
}
}
The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid class loading overhead.
This API is not supported by non-dynamic JVM implementations (like TeaVM and GraalVM) because of using class loaders.
A similar feature is also available on JS.
import space.kscience.kmath.expressions.Symbol.Companion.x
import space.kscience.kmath.expressions.*
import space.kscience.kmath.operations.*
import space.kscience.kmath.estree.*
MstField { x + 2 }.compileToExpression(DoubleField)
The code above returns expression implemented with such a JS function:
var executable = function (constants, arguments) {
return constants[1](constants[0](arguments, "x"), 2);
};
JS also supports experimental expression optimization with WebAssembly IR generation. Currently, only expressions inside DoubleField
and IntRing
are supported.
import space.kscience.kmath.expressions.Symbol.Companion.x
import space.kscience.kmath.expressions.*
import space.kscience.kmath.operations.*
import space.kscience.kmath.wasm.*
MstField { x + 2 }.compileToExpression(DoubleField)
An example of emitted Wasm IR in the form of WAT:
(func $executable (param $0 f64) (result f64)
(f64.add
(local.get $0)
(f64.const 2)
)
)
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/).
kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.
Example usage:
import space.kscience.kmath.ast.*
import space.kscience.kmath.ast.rendering.*
import space.kscience.kmath.misc.*
Performance and visualization extensions to MST API.
src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt : Expression language and its parser
src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt : Dynamic MST to JVM bytecode compiler
src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt : Dynamic MST to JS compiler
src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt : Extendable MST rendering
The Maven coordinates of this project are space.kscience:kmath-ast:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-ast:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-ast:0.3.0-dev-17")
}
kmath-ast
JVM module supports runtime code generation to eliminate overhead of tree traversal. Code generator builds a special implementation of Expression<T>
with implemented invoke
function.
For example, the following builder:
import space.kscience.kmath.expressions.Symbol.Companion.x
import space.kscience.kmath.expressions.*
import space.kscience.kmath.operations.*
import space.kscience.kmath.asm.*
MstField { x + 2 }.compileToExpression(DoubleField)
... leads to generation of bytecode, which can be decompiled to the following Java class:
package space.kscience.kmath.asm.generated;
import java.util.Map;
import kotlin.jvm.functions.Function2;
import space.kscience.kmath.asm.internal.MapIntrinsics;
import space.kscience.kmath.expressions.Expression;
import space.kscience.kmath.expressions.Symbol;
public final class AsmCompiledExpression_45045_0 implements Expression<Double> {
private final Object[] constants;
public final Double invoke(Map<Symbol, ? extends Double> arguments) {
return (Double) ((Function2) this.constants[0]).invoke((Double) MapIntrinsics.getOrFail(arguments, "x"), 2);
}
public AsmCompiledExpression_45045_0(Object[] constants) {
this.constants = constants;
}
}
The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid class loading overhead.
This API is not supported by non-dynamic JVM implementations (like TeaVM and GraalVM) because of using class loaders.
A similar feature is also available on JS.
import space.kscience.kmath.expressions.Symbol.Companion.x
import space.kscience.kmath.expressions.*
import space.kscience.kmath.operations.*
import space.kscience.kmath.estree.*
MstField { x + 2 }.compileToExpression(DoubleField)
The code above returns expression implemented with such a JS function:
var executable = function (constants, arguments) {
return constants[1](constants[0](arguments, "x"), 2);
};
JS also supports experimental expression optimization with WebAssembly IR generation. Currently, only expressions inside DoubleField
and IntRing
are supported.
import space.kscience.kmath.expressions.Symbol.Companion.x
import space.kscience.kmath.expressions.*
import space.kscience.kmath.operations.*
import space.kscience.kmath.wasm.*
MstField { x + 2 }.compileToExpression(DoubleField)
An example of emitted Wasm IR in the form of WAT:
(func $executable (param $0 f64) (result f64)
(f64.add
(local.get $0)
(f64.const 2)
)
)
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/).
kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.
Example usage:
import space.kscience.kmath.ast.*
import space.kscience.kmath.ast.rendering.*
import space.kscience.kmath.misc.*
Complex and hypercomplex number systems in KMath.
src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt : Complex Numbers
src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt : Quaternions
The Maven coordinates of this project are space.kscience:kmath-complex:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-complex:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-complex:0.3.0-dev-16")
}
Complex and hypercomplex number systems in KMath.
src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt : Complex Numbers
src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt : Quaternions
The Maven coordinates of this project are space.kscience:kmath-complex:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-complex:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-complex:0.3.0-dev-17")
}
The core interfaces of KMath.
src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt : Algebraic structures like rings, spaces and fields.
src/commonMain/kotlin/space/kscience/kmath/structures/StructureND.kt : Many-dimensional structures and operations on them.
src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt : Basic linear algebra operations (sums, products, etc.), backed by the Space
API. Advanced linear algebra operations like matrix inversion and LU decomposition.
src/commonMain/kotlin/space/kscience/kmath/structures/Buffers.kt : One-dimensional structure
src/commonMain/kotlin/space/kscience/kmath/expressions : By writing a single mathematical expression once, users will be able to apply different types of objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high performance calculations to code generation.
src/commonMain/kotlin/space/kscience/kmath/domains : Domains
src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt : Automatic differentiation
The Maven coordinates of this project are space.kscience:kmath-core:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-core:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-core:0.3.0-dev-16")
}
The core interfaces of KMath.
src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt : Algebraic structures like rings, spaces and fields.
src/commonMain/kotlin/space/kscience/kmath/structures/StructureND.kt : Many-dimensional structures and operations on them.
src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt : Basic linear algebra operations (sums, products, etc.), backed by the Space
API. Advanced linear algebra operations like matrix inversion and LU decomposition.
src/commonMain/kotlin/space/kscience/kmath/structures/Buffers.kt : One-dimensional structure
src/commonMain/kotlin/space/kscience/kmath/expressions : By writing a single mathematical expression once, users will be able to apply different types of objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high performance calculations to code generation.
src/commonMain/kotlin/space/kscience/kmath/domains : Domains
src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt : Automatic differentiation
The Maven coordinates of this project are space.kscience:kmath-core:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-core:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-core:0.3.0-dev-17")
}
EJML based linear algebra implementation.
src/main/kotlin/space/kscience/kmath/ejml/EjmlVector.kt : Point implementations.
src/main/kotlin/space/kscience/kmath/ejml/EjmlMatrix.kt : Matrix implementation.
src/main/kotlin/space/kscience/kmath/ejml/EjmlLinearSpace.kt : LinearSpace implementations.
The Maven coordinates of this project are space.kscience:kmath-ejml:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-ejml:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-ejml:0.3.0-dev-16")
}
EJML based linear algebra implementation.
src/main/kotlin/space/kscience/kmath/ejml/EjmlVector.kt : Point implementations.
src/main/kotlin/space/kscience/kmath/ejml/EjmlMatrix.kt : Matrix implementation.
src/main/kotlin/space/kscience/kmath/ejml/EjmlLinearSpace.kt : LinearSpace implementations.
The Maven coordinates of this project are space.kscience:kmath-ejml:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-ejml:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-ejml:0.3.0-dev-17")
}
Specialization of KMath APIs for Double numbers.
src/commonMain/kotlin/space/kscience/kmath/real/DoubleVector.kt : Numpy-like operations for Buffers/Points
src/commonMain/kotlin/space/kscience/kmath/real/DoubleMatrix.kt : Numpy-like operations for 2d real structures
src/commonMain/kotlin/space/kscience/kmath/structures/grids.kt : Uniform grid generators
The Maven coordinates of this project are space.kscience:kmath-for-real:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-for-real:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-for-real:0.3.0-dev-16")
}
Specialization of KMath APIs for Double numbers.
src/commonMain/kotlin/space/kscience/kmath/real/DoubleVector.kt : Numpy-like operations for Buffers/Points
src/commonMain/kotlin/space/kscience/kmath/real/DoubleMatrix.kt : Numpy-like operations for 2d real structures
src/commonMain/kotlin/space/kscience/kmath/structures/grids.kt : Uniform grid generators
The Maven coordinates of this project are space.kscience:kmath-for-real:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-for-real:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-for-real:0.3.0-dev-17")
}
Functions and interpolations.
src/commonMain/kotlin/space/kscience/kmath/functions/Piecewise.kt : Piecewise functions.
src/commonMain/kotlin/space/kscience/kmath/functions/Polynomial.kt : Polynomial functions.
src/commonMain/kotlin/space/kscience/kmath/interpolation/LinearInterpolator.kt : Linear XY interpolator.
src/commonMain/kotlin/space/kscience/kmath/interpolation/SplineInterpolator.kt : Cubic spline XY interpolator.
# : Univariate and multivariate quadratures
The Maven coordinates of this project are space.kscience:kmath-functions:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-functions:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-functions:0.3.0-dev-16")
}
Functions and interpolations.
src/commonMain/kotlin/space/kscience/kmath/functions/Piecewise.kt : Piecewise functions.
src/commonMain/kotlin/space/kscience/kmath/functions/Polynomial.kt : Polynomial functions.
src/commonMain/kotlin/space/kscience/kmath/interpolation/LinearInterpolator.kt : Linear XY interpolator.
src/commonMain/kotlin/space/kscience/kmath/interpolation/SplineInterpolator.kt : Cubic spline XY interpolator.
# : Univariate and multivariate quadratures
The Maven coordinates of this project are space.kscience:kmath-functions:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-functions:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-functions:0.3.0-dev-17")
}
Integration with Jafama.
src/main/kotlin/space/kscience/kmath/jafama/ : Double ExtendedField implementations based on Jafama
The Maven coordinates of this project are space.kscience:kmath-jafama:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-jafama:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-jafama:0.3.0-dev-16")
}
All the DoubleField
uses can be replaced with JafamaDoubleField
or StrictJafamaDoubleField
.
import space.kscience.kmath.jafama.*
import space.kscience.kmath.operations.*
fun main() {
val a = 2.0
val b = StrictJafamaDoubleField { exp(a) }
println(JafamaDoubleField { b + a })
println(StrictJafamaDoubleField { ln(b) })
}
According to KMath benchmarks on GraalVM, Jafama functions are slower than JDK math; however, there are indications that on Hotspot Jafama is a bit faster.
Can't find appropriate benchmark data. Try generating readme files after running benchmarks.
Integration with Jafama.
src/main/kotlin/space/kscience/kmath/jafama/ : Double ExtendedField implementations based on Jafama
The Maven coordinates of this project are space.kscience:kmath-jafama:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-jafama:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-jafama:0.3.0-dev-17")
}
All the DoubleField
uses can be replaced with JafamaDoubleField
or StrictJafamaDoubleField
.
import space.kscience.kmath.jafama.*
import space.kscience.kmath.operations.*
fun main() {
val a = 2.0
val b = StrictJafamaDoubleField { exp(a) }
println(JafamaDoubleField { b + a })
println(StrictJafamaDoubleField { ln(b) })
}
According to KMath benchmarks on GraalVM, Jafama functions are slower than JDK math; however, there are indications that on Hotspot Jafama is a bit faster.
Can't find appropriate benchmark data. Try generating readme files after running benchmarks.
Kotlin∇ integration module.
src/main/kotlin/space/kscience/kmath/kotlingrad/KotlingradExpression.kt : MST based DifferentiableExpression.
src/main/kotlin/space/kscience/kmath/kotlingrad/scalarsAdapters.kt : Conversions between Kotlin∇'s SFun and MST
The Maven coordinates of this project are space.kscience:kmath-kotlingrad:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-kotlingrad:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-kotlingrad:0.3.0-dev-16")
}
Kotlin∇ integration module.
src/main/kotlin/space/kscience/kmath/kotlingrad/KotlingradExpression.kt : MST based DifferentiableExpression.
src/main/kotlin/space/kscience/kmath/kotlingrad/scalarsAdapters.kt : Conversions between Kotlin∇'s SFun and MST
The Maven coordinates of this project are space.kscience:kmath-kotlingrad:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-kotlingrad:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-kotlingrad:0.3.0-dev-17")
}
ND4J based implementations of KMath abstractions.
# : NDStructure wrapper for INDArray
# : Rings over Nd4jArrayStructure of Int and Long
# : Fields over Nd4jArrayStructure of Float and Double
The Maven coordinates of this project are space.kscience:kmath-nd4j:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-nd4j:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-nd4j:0.3.0-dev-16")
}
NDStructure wrapper for INDArray:
import org.nd4j.linalg.factory.*
import scientifik.kmath.nd4j.*
import scientifik.kmath.structures.*
val array = Nd4j.ones(2, 2).asDoubleStructure()
println(array[0, 0]) // 1.0
array[intArrayOf(0, 0)] = 24.0
println(array[0, 0]) // 24.0
Fast element-wise and in-place arithmetics for INDArray:
import org.nd4j.linalg.factory.*
import scientifik.kmath.nd4j.*
import scientifik.kmath.operations.*
val field = DoubleNd4jArrayField(intArrayOf(2, 2))
val array = Nd4j.rand(2, 2).asDoubleStructure()
val res = field {
(25.0 / array + 20) * 4
}
println(res.ndArray)
// [[ 250.6449, 428.5840],
// [ 269.7913, 202.2077]]
Contributed by Iaroslav Postovalov.
ND4J based implementations of KMath abstractions.
# : NDStructure wrapper for INDArray
# : Rings over Nd4jArrayStructure of Int and Long
# : Fields over Nd4jArrayStructure of Float and Double
The Maven coordinates of this project are space.kscience:kmath-nd4j:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-nd4j:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-nd4j:0.3.0-dev-17")
}
NDStructure wrapper for INDArray:
import org.nd4j.linalg.factory.*
import scientifik.kmath.nd4j.*
import scientifik.kmath.structures.*
val array = Nd4j.ones(2, 2).asDoubleStructure()
println(array[0, 0]) // 1.0
array[intArrayOf(0, 0)] = 24.0
println(array[0, 0]) // 24.0
Fast element-wise and in-place arithmetics for INDArray:
import org.nd4j.linalg.factory.*
import scientifik.kmath.nd4j.*
import scientifik.kmath.operations.*
val field = DoubleNd4jArrayField(intArrayOf(2, 2))
val array = Nd4j.rand(2, 2).asDoubleStructure()
val res = field {
(25.0 / array + 20) * 4
}
println(res.ndArray)
// [[ 250.6449, 428.5840],
// [ 269.7913, 202.2077]]
Contributed by Iaroslav Postovalov.
Common linear algebra operations on tensors.
src/commonMain/kotlin/space/kscience/kmath/tensors/api/TensorAlgebra.kt : Basic linear algebra operations on tensors (plus, dot, etc.)
src/commonMain/kotlin/space/kscience/kmath/tensors/core/BroadcastDoubleTensorAlgebra.kt : Basic linear algebra operations implemented with broadcasting.
src/commonMain/kotlin/space/kscience/kmath/tensors/api/LinearOpsTensorAlgebra.kt : Advanced linear algebra operations like LU decomposition, SVD, etc.
The Maven coordinates of this project are space.kscience:kmath-tensors:0.3.0-dev-16
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-tensors:0.3.0-dev-16'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-tensors:0.3.0-dev-16")
}
Common linear algebra operations on tensors.
src/commonMain/kotlin/space/kscience/kmath/tensors/api/TensorAlgebra.kt : Basic linear algebra operations on tensors (plus, dot, etc.)
src/commonMain/kotlin/space/kscience/kmath/tensors/core/BroadcastDoubleTensorAlgebra.kt : Basic linear algebra operations implemented with broadcasting.
src/commonMain/kotlin/space/kscience/kmath/tensors/api/LinearOpsTensorAlgebra.kt : Advanced linear algebra operations like LU decomposition, SVD, etc.
The Maven coordinates of this project are space.kscience:kmath-tensors:0.3.0-dev-17
.
Gradle:
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-tensors:0.3.0-dev-17'
}
Gradle Kotlin DSL:
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-tensors:0.3.0-dev-17")
}