Merge remote-tracking branch 'origin/dev' into refactor/histogram

# Conflicts:
#	buildSrc/gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
This commit is contained in:
Alexander Nozik 2022-04-10 09:41:38 +03:00
commit 3de8976ea5
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357
40 changed files with 590 additions and 190 deletions

View File

@ -13,25 +13,13 @@ jobs:
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
timeout-minutes: 40 timeout-minutes: 40
steps: steps:
- name: Checkout the repo - uses: actions/checkout@v3.0.0
uses: actions/checkout@v2 - uses: actions/setup-java@v3.0.0
- name: Set up JDK 11
uses: DeLaGuardo/setup-graalvm@4.0
with: with:
graalvm: 21.2.0 java-version: 11
java: java11 distribution: liberica
arch: amd64
- name: Cache gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache konan - name: Cache konan
uses: actions/cache@v2 uses: actions/cache@v3.0.1
with: with:
path: ~/.konan path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
@ -39,5 +27,6 @@ jobs:
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Gradle Wrapper Validation - name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4 uses: gradle/wrapper-validation-action@v1.0.4
- name: Build - uses: gradle/gradle-build-action@v2.1.5
run: ./gradlew build --build-cache --no-daemon --stacktrace with:
arguments: build

View File

@ -9,20 +9,22 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
timeout-minutes: 40 timeout-minutes: 40
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3.0.0
- uses: DeLaGuardo/setup-graalvm@4.0 - uses: actions/setup-java@v3.0.0
with: with:
graalvm: 21.2.0 java-version: 11
java: java11 distribution: liberica
arch: amd64 - name: Cache konan
- uses: actions/cache@v2 uses: actions/cache@v3.0.1
with: with:
path: ~/.gradle/caches path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: | restore-keys: |
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- run: ./gradlew dokkaHtmlMultiModule --build-cache --no-daemon --no-parallel --stacktrace - uses: gradle/gradle-build-action@v2.1.5
- uses: JamesIves/github-pages-deploy-action@4.1.0 with:
arguments: dokkaHtmlMultiModule --no-parallel
- uses: JamesIves/github-pages-deploy-action@4.2.5
with: with:
branch: gh-pages branch: gh-pages
folder: build/dokka/htmlMultiModule folder: build/dokka/htmlMultiModule

View File

@ -14,42 +14,36 @@ jobs:
os: [ macOS-latest, windows-latest ] os: [ macOS-latest, windows-latest ]
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- name: Checkout the repo - uses: actions/checkout@v3.0.0
uses: actions/checkout@v2 - uses: actions/setup-java@v3.0.0
- name: Set up JDK 11
uses: DeLaGuardo/setup-graalvm@4.0
with: with:
graalvm: 21.2.0 java-version: 11
java: java11 distribution: liberica
arch: amd64
- name: Cache gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache konan - name: Cache konan
uses: actions/cache@v2 uses: actions/cache@v3.0.1
with: with:
path: ~/.konan path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: | restore-keys: |
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/wrapper-validation-action@v1.0.4
- name: Publish Windows Artifacts - name: Publish Windows Artifacts
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: cmd uses: gradle/gradle-build-action@v2.1.5
run: > with:
./gradlew release --no-daemon --build-cache -Ppublishing.enabled=true arguments: |
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }} releaseAll
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }} -Ppublishing.enabled=true
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}
- name: Publish Mac Artifacts - name: Publish Mac Artifacts
if: matrix.os == 'macOS-latest' if: matrix.os == 'macOS-latest'
run: > uses: gradle/gradle-build-action@v2.1.5
./gradlew release --no-daemon --build-cache -Ppublishing.enabled=true -Ppublishing.platform=macosX64 with:
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }} arguments: |
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }} releaseMacosX64
releaseIosArm64
releaseIosX64
-Ppublishing.enabled=true
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}

View File

@ -52,21 +52,18 @@ module definitions below. The module stability could have the following levels:
## Modules ## Modules
<hr/>
* ### [benchmarks](benchmarks) ### [benchmarks](benchmarks)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/>
* ### [examples](examples) ### [examples](examples)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/>
* ### [kmath-ast](kmath-ast) ### [kmath-ast](kmath-ast)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
@ -77,15 +74,13 @@ module definitions below. The module stability could have the following levels:
> - [mst-js-codegen](kmath-ast/src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt) : Dynamic MST to JS 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 > - [rendering](kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt) : Extendable MST rendering
<hr/>
* ### [kmath-commons](kmath-commons) ### [kmath-commons](kmath-commons)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/>
* ### [kmath-complex](kmath-complex) ### [kmath-complex](kmath-complex)
> Complex numbers and quaternions. > Complex numbers and quaternions.
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
@ -94,9 +89,8 @@ module definitions below. The module stability could have the following levels:
> - [complex](kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt) : Complex Numbers > - [complex](kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Complex.kt) : Complex Numbers
> - [quaternion](kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt) : Quaternions > - [quaternion](kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/Quaternion.kt) : Quaternions
<hr/>
* ### [kmath-core](kmath-core) ### [kmath-core](kmath-core)
> Core classes, algebra definitions, basic linear algebra > Core classes, algebra definitions, basic linear algebra
> >
> **Maturity**: DEVELOPMENT > **Maturity**: DEVELOPMENT
@ -112,21 +106,18 @@ performance calculations to code generation.
> - [domains](kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains) : Domains > - [domains](kmath-core/src/commonMain/kotlin/space/kscience/kmath/domains) : Domains
> - [autodiff](kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation > - [autodiff](kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
<hr/>
* ### [kmath-coroutines](kmath-coroutines) ### [kmath-coroutines](kmath-coroutines)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/>
* ### [kmath-dimensions](kmath-dimensions) ### [kmath-dimensions](kmath-dimensions)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-ejml](kmath-ejml) ### [kmath-ejml](kmath-ejml)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
@ -136,9 +127,8 @@ performance calculations to code generation.
> - [ejml-matrix](kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/EjmlMatrix.kt) : Matrix implementation. > - [ejml-matrix](kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/EjmlMatrix.kt) : Matrix implementation.
> - [ejml-linear-space](kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/EjmlLinearSpace.kt) : LinearSpace implementations. > - [ejml-linear-space](kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/EjmlLinearSpace.kt) : LinearSpace implementations.
<hr/>
* ### [kmath-for-real](kmath-for-real) ### [kmath-for-real](kmath-for-real)
> Extension module that should be used to achieve numpy-like behavior. > Extension module that should be used to achieve numpy-like behavior.
All operations are specialized to work with `Double` numbers without declaring algebraic contexts. All operations are specialized to work with `Double` numbers without declaring algebraic contexts.
One can still use generic algebras though. One can still use generic algebras though.
@ -150,9 +140,8 @@ One can still use generic algebras though.
> - [DoubleMatrix](kmath-for-real/src/commonMain/kotlin/space/kscience/kmath/real/DoubleMatrix.kt) : Numpy-like operations for 2d real structures > - [DoubleMatrix](kmath-for-real/src/commonMain/kotlin/space/kscience/kmath/real/DoubleMatrix.kt) : Numpy-like operations for 2d real structures
> - [grids](kmath-for-real/src/commonMain/kotlin/space/kscience/kmath/structures/grids.kt) : Uniform grid generators > - [grids](kmath-for-real/src/commonMain/kotlin/space/kscience/kmath/structures/grids.kt) : Uniform grid generators
<hr/>
* ### [kmath-functions](kmath-functions) ### [kmath-functions](kmath-functions)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
@ -164,21 +153,18 @@ One can still use generic algebras though.
> - [spline interpolation](kmath-functions/src/commonMain/kotlin/space/kscience/kmath/interpolation/SplineInterpolator.kt) : Cubic spline 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 > - [integration](kmath-functions/#) : Univariate and multivariate quadratures
<hr/>
* ### [kmath-geometry](kmath-geometry) ### [kmath-geometry](kmath-geometry)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-histograms](kmath-histograms) ### [kmath-histograms](kmath-histograms)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-jafama](kmath-jafama) ### [kmath-jafama](kmath-jafama)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
@ -186,15 +172,13 @@ One can still use generic algebras though.
> **Features:** > **Features:**
> - [jafama-double](kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/) : Double ExtendedField implementations based on Jafama > - [jafama-double](kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/) : Double ExtendedField implementations based on Jafama
<hr/>
* ### [kmath-jupyter](kmath-jupyter) ### [kmath-jupyter](kmath-jupyter)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-kotlingrad](kmath-kotlingrad) ### [kmath-kotlingrad](kmath-kotlingrad)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
@ -203,21 +187,18 @@ One can still use generic algebras though.
> - [differentiable-mst-expression](kmath-kotlingrad/src/main/kotlin/space/kscience/kmath/kotlingrad/KotlingradExpression.kt) : MST based DifferentiableExpression. > - [differentiable-mst-expression](kmath-kotlingrad/src/main/kotlin/space/kscience/kmath/kotlingrad/KotlingradExpression.kt) : MST based DifferentiableExpression.
> - [scalars-adapters](kmath-kotlingrad/src/main/kotlin/space/kscience/kmath/kotlingrad/scalarsAdapters.kt) : Conversions between Kotlin∇'s SFun and MST > - [scalars-adapters](kmath-kotlingrad/src/main/kotlin/space/kscience/kmath/kotlingrad/scalarsAdapters.kt) : Conversions between Kotlin∇'s SFun and MST
<hr/>
* ### [kmath-memory](kmath-memory) ### [kmath-memory](kmath-memory)
> An API and basic implementation for arranging objects in a continuous memory block. > An API and basic implementation for arranging objects in a continuous memory block.
> >
> **Maturity**: DEVELOPMENT > **Maturity**: DEVELOPMENT
<hr/>
* ### [kmath-multik](kmath-multik) ### [kmath-multik](kmath-multik)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-nd4j](kmath-nd4j) ### [kmath-nd4j](kmath-nd4j)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
@ -227,33 +208,28 @@ One can still use generic algebras though.
> - [nd4jarrayrings](kmath-nd4j/#) : Rings over Nd4jArrayStructure of Int and Long > - [nd4jarrayrings](kmath-nd4j/#) : Rings over Nd4jArrayStructure of Int and Long
> - [nd4jarrayfields](kmath-nd4j/#) : Fields over Nd4jArrayStructure of Float and Double > - [nd4jarrayfields](kmath-nd4j/#) : Fields over Nd4jArrayStructure of Float and Double
<hr/>
* ### [kmath-optimization](kmath-optimization) ### [kmath-optimization](kmath-optimization)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/>
* ### [kmath-stat](kmath-stat) ### [kmath-stat](kmath-stat)
> >
> >
> **Maturity**: EXPERIMENTAL > **Maturity**: EXPERIMENTAL
<hr/>
* ### [kmath-symja](kmath-symja) ### [kmath-symja](kmath-symja)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-tensorflow](kmath-tensorflow) ### [kmath-tensorflow](kmath-tensorflow)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
<hr/>
* ### [kmath-tensors](kmath-tensors) ### [kmath-tensors](kmath-tensors)
> >
> >
> **Maturity**: PROTOTYPE > **Maturity**: PROTOTYPE
@ -263,13 +239,11 @@ One can still use generic algebras though.
> - [tensor algebra with broadcasting](kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/core/BroadcastDoubleTensorAlgebra.kt) : Basic linear algebra operations implemented with broadcasting. > - [tensor algebra with broadcasting](kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/core/BroadcastDoubleTensorAlgebra.kt) : Basic linear algebra operations implemented with broadcasting.
> - [linear algebra operations](kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/api/LinearOpsTensorAlgebra.kt) : Advanced linear algebra operations like LU decomposition, SVD, etc. > - [linear algebra operations](kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/api/LinearOpsTensorAlgebra.kt) : Advanced linear algebra operations like LU decomposition, SVD, etc.
<hr/>
* ### [kmath-viktor](kmath-viktor) ### [kmath-viktor](kmath-viktor)
> >
> >
> **Maturity**: DEVELOPMENT > **Maturity**: DEVELOPMENT
<hr/>
## Multi-platform support ## Multi-platform support
@ -308,8 +282,8 @@ repositories {
} }
dependencies { dependencies {
api("space.kscience:kmath-core:0.3.0-dev-17") api("space.kscience:kmath-core:$version")
// api("space.kscience:kmath-core-jvm:0.3.0-dev-17") for jvm-specific version // api("space.kscience:kmath-core-jvm:$version") for jvm-specific version
} }
``` ```

4
benchmarks/README.md Normal file
View File

@ -0,0 +1,4 @@
# Module benchmarks

View File

@ -155,7 +155,7 @@ kotlin.sourceSets.all {
} }
} }
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile> {
kotlinOptions { kotlinOptions {
jvmTarget = "11" jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xlambdas=indy" freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xlambdas=indy"

View File

@ -56,7 +56,7 @@ subprojects {
readme.readmeTemplate = file("docs/templates/README-TEMPLATE.md") readme.readmeTemplate = file("docs/templates/README-TEMPLATE.md")
ksciencePublish { ksciencePublish {
github("kmath") github("kmath", addToRelease = false)
space() space()
sonatype() sonatype()
} }

View File

@ -1,7 +1,7 @@
plugins { plugins {
`kotlin-dsl` `kotlin-dsl`
`version-catalog` `version-catalog`
alias(npmlibs.plugins.kotlin.plugin.serialization) alias(miptNpmLibs.plugins.kotlin.plugin.serialization)
} }
java.targetCompatibility = JavaVersion.VERSION_11 java.targetCompatibility = JavaVersion.VERSION_11
@ -14,8 +14,8 @@ repositories {
} }
val toolsVersion: String by extra val toolsVersion: String by extra
val kotlinVersion = npmlibs.versions.kotlin.asProvider().get() val kotlinVersion = miptNpmLibs.versions.kotlin.asProvider().get()
val benchmarksVersion = npmlibs.versions.kotlinx.benchmark.get() val benchmarksVersion = miptNpmLibs.versions.kotlinx.benchmark.get()
dependencies { dependencies {
api("ru.mipt.npm:gradle-tools:$toolsVersion") api("ru.mipt.npm:gradle-tools:$toolsVersion")
@ -23,7 +23,7 @@ dependencies {
api("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:$benchmarksVersion") api("org.jetbrains.kotlinx:kotlinx-benchmark-plugin:$benchmarksVersion")
api("org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion") api("org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion")
//to be used inside build-script only //to be used inside build-script only
implementation(npmlibs.kotlinx.serialization.json) implementation(miptNpmLibs.kotlinx.serialization.json)
} }
kotlin.sourceSets.all { kotlin.sourceSets.all {

View File

@ -4,5 +4,4 @@
# #
kotlin.code.style=official kotlin.code.style=official
toolsVersion=0.11.2-kotlin-1.6.10 toolsVersion=0.11.2-kotlin-1.6.10

View File

@ -4,10 +4,8 @@
*/ */
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("VERSION_CATALOGS")
dependencyResolutionManagement { dependencyResolutionManagement {
val toolsVersion: String by extra val toolsVersion: String by extra
repositories { repositories {
@ -18,8 +16,8 @@ dependencyResolutionManagement {
} }
versionCatalogs { versionCatalogs {
create("npmlibs") { create("miptNpmLibs") {
from("ru.mipt.npm:version-catalog:$toolsVersion") from("ru.mipt.npm:version-catalog:$toolsVersion")
} }
} }
} }

View File

@ -52,7 +52,7 @@ module definitions below. The module stability could have the following levels:
## Modules ## Modules
$modules ${modules}
## Multi-platform support ## Multi-platform support

4
examples/README.md Normal file
View File

@ -0,0 +1,4 @@
# Module examples

View File

@ -58,7 +58,7 @@ kotlin.sourceSets.all {
} }
} }
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile> {
kotlinOptions { kotlinOptions {
jvmTarget = "11" jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xopt-in=kotlin.RequiresOptIn" + "-Xlambdas=indy" freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xopt-in=kotlin.RequiresOptIn" + "-Xlambdas=indy"

View File

@ -2,13 +2,10 @@
# Copyright 2018-2021 KMath contributors. # 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. # 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.code.style=official
kotlin.jupyter.add.scanner=false
kotlin.mpp.stability.nowarn=true kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true kotlin.native.ignoreDisabledTargets=true
kotlin.jupyter.add.scanner=false
org.gradle.configureondemand=true org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G
org.gradle.parallel=true

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -10,17 +10,17 @@ Extensions to MST API: transformations, dynamic compilation and visualization.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-ast:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-ast:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-ast:0.3.0-dev-17' implementation 'space.kscience:kmath-ast:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -31,7 +31,7 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-ast:0.3.0-dev-17") implementation("space.kscience:kmath-ast:0.3.0-dev-20")
} }
``` ```
@ -66,20 +66,19 @@ For example, the following code:
```kotlin ```kotlin
import space.kscience.kmath.asm.compileToExpression import space.kscience.kmath.asm.compileToExpression
import space.kscience.kmath.complex.ComplexField import space.kscience.kmath.operations.DoubleField
"x+2".parseMath().compileToExpression(ComplexField) "x^3-x+3".parseMath().compileToExpression(DoubleField)
``` ```
&mldr; leads to generation of bytecode, which can be decompiled to the following Java class: &mldr; leads to generation of bytecode, which can be decompiled to the following Java class:
```java ```java
import java.util.Map; import java.util.*;
import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.*;
import space.kscience.kmath.asm.internal.MapIntrinsics; import space.kscience.kmath.asm.internal.*;
import space.kscience.kmath.complex.Complex; import space.kscience.kmath.complex.*;
import space.kscience.kmath.expressions.Expression; import space.kscience.kmath.expressions.*;
import space.kscience.kmath.expressions.Symbol;
public final class CompiledExpression_45045_0 implements Expression<Complex> { public final class CompiledExpression_45045_0 implements Expression<Complex> {
private final Object[] constants; private final Object[] constants;
@ -91,6 +90,32 @@ public final class CompiledExpression_45045_0 implements Expression<Complex> {
} }
``` ```
For `LongRing`, `IntRing`, and `DoubleField` specialization is supported for better performance:
```java
import java.util.*;
import space.kscience.kmath.asm.internal.*;
import space.kscience.kmath.expressions.*;
public final class CompiledExpression_-386104628_0 implements DoubleExpression {
private final SymbolIndexer indexer;
public SymbolIndexer getIndexer() {
return this.indexer;
}
public double invoke(double[] arguments) {
double var2 = arguments[0];
return Math.pow(var2, 3.0D) - var2 + 3.0D;
}
public final Double invoke(Map<Symbol, ? extends Double> arguments) {
double var2 = ((Double)MapIntrinsics.getOrFail(arguments, "x")).doubleValue();
return Math.pow(var2, 3.0D) - var2 + 3.0D;
}
}
```
Setting JVM system property `space.kscience.kmath.ast.dump.generated.classes` to `1` makes the translator dump class files to program's working directory, so they can be reviewed manually. Setting JVM system property `space.kscience.kmath.ast.dump.generated.classes` to `1` makes the translator dump class files to program's working directory, so they can be reviewed manually.
#### Limitations #### Limitations
@ -134,9 +159,9 @@ MstField { x + 2 }.compileToExpression(DoubleField)
An example of emitted Wasm IR in the form of WAT: An example of emitted Wasm IR in the form of WAT:
```lisp ```lisp
(func $executable (param $0 f64) (result f64) (func \$executable (param \$0 f64) (result f64)
(f64.add (f64.add
(local.get $0) (local.get \$0)
(f64.const 2) (f64.const 2)
) )
) )

32
kmath-commons/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-commons
Commons math binding for kmath
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-commons:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-commons:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-commons:0.3.0-dev-20")
}
```

View File

@ -8,17 +8,17 @@ Complex and hypercomplex number systems in KMath.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-complex:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-complex:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-complex:0.3.0-dev-17' implementation 'space.kscience:kmath-complex:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -29,6 +29,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-complex:0.3.0-dev-17") implementation("space.kscience:kmath-complex:0.3.0-dev-20")
} }
``` ```

View File

@ -15,17 +15,17 @@ performance calculations to code generation.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-core:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-core:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-core:0.3.0-dev-17' implementation 'space.kscience:kmath-core:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -36,6 +36,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-core:0.3.0-dev-17") implementation("space.kscience:kmath-core:0.3.0-dev-20")
} }
``` ```

View File

@ -0,0 +1,32 @@
# Module kmath-coroutines
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-coroutines:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-coroutines:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-coroutines:0.3.0-dev-20")
}
```

View File

@ -0,0 +1,32 @@
# Module kmath-dimensions
A proof of concept module for adding type-safe dimensions to structures
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-dimensions:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-dimensions:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-dimensions:0.3.0-dev-20")
}
```

View File

@ -9,17 +9,17 @@ EJML based linear algebra implementation.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-ejml:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-ejml:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-ejml:0.3.0-dev-17' implementation 'space.kscience:kmath-ejml:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -30,6 +30,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-ejml:0.3.0-dev-17") implementation("space.kscience:kmath-ejml:0.3.0-dev-20")
} }
``` ```

View File

@ -9,17 +9,17 @@ Specialization of KMath APIs for Double numbers.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-for-real:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-for-real:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-for-real:0.3.0-dev-17' implementation 'space.kscience:kmath-for-real:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -30,6 +30,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-for-real:0.3.0-dev-17") implementation("space.kscience:kmath-for-real:0.3.0-dev-20")
} }
``` ```

View File

@ -11,17 +11,17 @@ Functions and interpolations.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-functions:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-functions:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-functions:0.3.0-dev-17' implementation 'space.kscience:kmath-functions:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -32,6 +32,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-functions:0.3.0-dev-17") implementation("space.kscience:kmath-functions:0.3.0-dev-20")
} }
``` ```

32
kmath-geometry/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-geometry
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-geometry:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-geometry:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-geometry:0.3.0-dev-20")
}
```

View File

@ -0,0 +1,32 @@
# Module kmath-histograms
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-histograms:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-histograms:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-histograms:0.3.0-dev-20")
}
```

View File

@ -7,17 +7,17 @@ Integration with [Jafama](https://github.com/jeffhain/jafama).
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-jafama:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-jafama:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-jafama:0.3.0-dev-17' implementation 'space.kscience:kmath-jafama:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -28,7 +28,7 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-jafama:0.3.0-dev-17") implementation("space.kscience:kmath-jafama:0.3.0-dev-20")
} }
``` ```

32
kmath-jupyter/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-jupyter
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-jupyter:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-jupyter:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-jupyter:0.3.0-dev-20")
}
```

View File

@ -8,17 +8,17 @@
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-kotlingrad:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-kotlingrad:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-kotlingrad:0.3.0-dev-17' implementation 'space.kscience:kmath-kotlingrad:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -29,6 +29,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-kotlingrad:0.3.0-dev-17") implementation("space.kscience:kmath-kotlingrad:0.3.0-dev-20")
} }
``` ```

32
kmath-memory/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-memory
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-memory:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-memory:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-memory:0.3.0-dev-20")
}
```

32
kmath-multik/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-multik
JetBrains Multik connector
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-multik:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-multik:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-multik:0.3.0-dev-20")
}
```

View File

@ -9,17 +9,17 @@ ND4J based implementations of KMath abstractions.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-nd4j:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-nd4j:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-nd4j:0.3.0-dev-17' implementation 'space.kscience:kmath-nd4j:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -30,7 +30,7 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-nd4j:0.3.0-dev-17") implementation("space.kscience:kmath-nd4j:0.3.0-dev-20")
} }
``` ```

View File

@ -0,0 +1,32 @@
# Module kmath-optimization
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-optimization:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-optimization:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-optimization:0.3.0-dev-20")
}
```

32
kmath-stat/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-stat
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-stat:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-stat:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-stat:0.3.0-dev-20")
}
```

32
kmath-symja/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-symja
Symja integration module
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-symja:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-symja:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-symja:0.3.0-dev-20")
}
```

View File

@ -0,0 +1,32 @@
# Module kmath-tensorflow
Google tensorflow connector
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-tensorflow:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-tensorflow:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-tensorflow:0.3.0-dev-20")
}
```

View File

@ -9,17 +9,17 @@ Common linear algebra operations on tensors.
## Artifact: ## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-tensors:0.3.0-dev-17`. The Maven coordinates of this project are `space.kscience:kmath-tensors:0.3.0-dev-20`.
**Gradle:** **Gradle Groovy:**
```gradle ```groovy
repositories { repositories {
maven { url 'https://repo.kotlin.link' } maven { url 'https://repo.kotlin.link' }
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
implementation 'space.kscience:kmath-tensors:0.3.0-dev-17' implementation 'space.kscience:kmath-tensors:0.3.0-dev-20'
} }
``` ```
**Gradle Kotlin DSL:** **Gradle Kotlin DSL:**
@ -30,6 +30,6 @@ repositories {
} }
dependencies { dependencies {
implementation("space.kscience:kmath-tensors:0.3.0-dev-17") implementation("space.kscience:kmath-tensors:0.3.0-dev-20")
} }
``` ```

32
kmath-viktor/README.md Normal file
View File

@ -0,0 +1,32 @@
# Module kmath-viktor
Binding for https://github.com/JetBrains-Research/viktor
## Usage
## Artifact:
The Maven coordinates of this project are `space.kscience:kmath-viktor:0.3.0-dev-20`.
**Gradle Groovy:**
```groovy
repositories {
maven { url 'https://repo.kotlin.link' }
mavenCentral()
}
dependencies {
implementation 'space.kscience:kmath-viktor:0.3.0-dev-20'
}
```
**Gradle Kotlin DSL:**
```kotlin
repositories {
maven("https://repo.kotlin.link")
mavenCentral()
}
dependencies {
implementation("space.kscience:kmath-viktor:0.3.0-dev-20")
}
```

View File

@ -1,8 +1,6 @@
rootProject.name = "kmath" rootProject.name = "kmath"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("VERSION_CATALOGS")
include( include(
":kmath-memory", ":kmath-memory",
":kmath-complex", ":kmath-complex",