forked from kscience/kmath
Merge branch 'dev' into gsl-experiment
# Conflicts: # .github/workflows/build.yml
This commit is contained in:
commit
55f8c3938b
@ -12,6 +12,8 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Install libgsl-dev
|
||||
run: sudo apt install -y libgsl-dev gcc-multilib
|
||||
- name: Install Chrome
|
||||
@ -49,6 +51,8 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Install gsl
|
||||
run: brew install gsl
|
||||
- name: Cache gradle
|
||||
@ -81,6 +85,8 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Add msys to path
|
||||
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
||||
- name: Cache gradle
|
117
.github/workflows/publish.yml
vendored
Normal file
117
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
name: Bintray Publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Install Chrome
|
||||
run: |
|
||||
sudo apt install -y libappindicator1 fonts-liberation
|
||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
sudo dpkg -i google-chrome*.deb
|
||||
- name: Cache gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
.gradle
|
||||
build
|
||||
~/.gradle
|
||||
key: gradle
|
||||
restore-keys: gradle
|
||||
|
||||
- name: Cache konan
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.konan/dependencies
|
||||
~/.konan/kotlin-native-prebuilt-linux-*
|
||||
key: ${{ runner.os }}-konan
|
||||
restore-keys: ${{ runner.os }}-konan
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
||||
- name: Run release task
|
||||
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
||||
|
||||
build-osx:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Cache gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
.gradle
|
||||
build
|
||||
~/.gradle
|
||||
key: gradle
|
||||
restore-keys: gradle
|
||||
|
||||
- name: Cache konan
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.konan/dependencies
|
||||
~/.konan/kotlin-native-prebuilt-macos-*
|
||||
key: ${{ runner.os }}-konan
|
||||
restore-keys: ${{ runner.os }}-konan
|
||||
- name: Build with Gradle
|
||||
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
|
||||
- name: Run release task
|
||||
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Add msys to path
|
||||
run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
|
||||
- name: Cache gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
.gradle
|
||||
build
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-gradle
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
|
||||
- name: Cache konan
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.konan/dependencies
|
||||
~/.konan/kotlin-native-prebuilt-mingw-*
|
||||
key: ${{ runner.os }}-konan
|
||||
restore-keys: ${{ runner.os }}-konan
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew --build-cache build
|
||||
- name: Run release task
|
||||
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
|
||||
|
@ -38,6 +38,7 @@
|
||||
- Features moved to NDStructure and became transparent.
|
||||
- Capitalization of LUP in many names changed to Lup.
|
||||
- Refactored `NDStructure` algebra to be more simple, preferring under-the-hood conversion to explicit NDStructure types
|
||||
- Refactor histograms. They are marked as prototype
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
90
README.md
90
README.md
@ -9,7 +9,7 @@ Bintray-dev: [ ![Download](https://api.bintray.com/packages/mipt-npm/dev/kmat
|
||||
|
||||
# KMath
|
||||
|
||||
Could be pronounced as `key-math`. The Kotlin MATHematics library was initially intended as a Kotlin-based analog to
|
||||
Could be pronounced as `key-math`. The **K**otlin **Math**ematics library was initially intended as a Kotlin-based analog to
|
||||
Python's NumPy library. Later we found that kotlin is much more flexible language and allows superior architecture
|
||||
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.
|
||||
@ -32,49 +32,46 @@ be achieved with [kmath-for-real](/kmath-for-real) extension module.
|
||||
* Provide the best performance out of the box. We have specialized libraries for that. Need only API wrappers for them.
|
||||
* Cover all cases as immediately and in one bundle. We will modularize everything and add new features gradually.
|
||||
* Provide specialized behavior in the core. API is made generic on purpose, so one needs to specialize for types, like
|
||||
for `Double` in the core. For that we will have specialization modules like `for-real`, which will give better
|
||||
for `Double` in the core. For that we will have specialization modules like `kmath-for-real`, which will give better
|
||||
experience for those, who want to work with specific types.
|
||||
|
||||
## Features
|
||||
## Features and stability
|
||||
|
||||
Current feature list is [here](/docs/features.md)
|
||||
KMath is a modular library. Different modules provide different features with different API stability guarantees. All core modules are released with the same version, but with different API change policy. The features are described in module definitions below. The module stability could have following levels:
|
||||
|
||||
* **Algebra**
|
||||
* Algebraic structures like rings, spaces and fields (**TODO** add example to wiki)
|
||||
* Basic linear algebra operations (sums, products, etc.), backed by the `Space` API.
|
||||
* Complex numbers backed by the `Field` API (meaning they will be usable in any structure like vectors and
|
||||
N-dimensional arrays).
|
||||
* Advanced linear algebra operations like matrix inversion and LU decomposition.
|
||||
* **PROTOTYPE**. On this level there are no compatibility guarantees. All methods and classes form those modules could break any moment. You can still use it, but be sure to fix the specific version.
|
||||
* **EXPERIMENTAL**. The general API is decided, but some changes could be made. Volatile API is marked with `@UnstableKmathAPI` or other stability warning annotations.
|
||||
* **DEVELOPMENT**. API breaking genrally follows semantic versioning ideology. There could be changes in minor versions, but not in patch versions. API is protected with [binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator) tool.
|
||||
* **STABLE**. The API stabilized. Breaking changes are allowed only in major releases.
|
||||
|
||||
* **Array-like structures** Full support of many-dimensional array-like structures
|
||||
including mixed arithmetic operations and function operations over arrays and numbers (with the added benefit of static type checking).
|
||||
<!--Current feature list is [here](/docs/features.md)-->
|
||||
|
||||
* **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.
|
||||
|
||||
* **Histograms** Fast multi-dimensional histograms.
|
||||
<!--* **Array-like structures** Full support of many-dimensional array-like structures -->
|
||||
<!--including mixed arithmetic operations and function operations over arrays and numbers (with the added benefit of static type checking).-->
|
||||
|
||||
* **Streaming** Streaming operations on mathematical objects and objects buffers.
|
||||
<!--* **Histograms** Fast multi-dimensional histograms.-->
|
||||
|
||||
* **Type-safe dimensions** Type-safe dimensions for matrix operations.
|
||||
<!--* **Streaming** Streaming operations on mathematical objects and objects buffers.-->
|
||||
|
||||
* **Commons-math wrapper** It is planned to gradually wrap most parts of
|
||||
[Apache commons-math](http://commons.apache.org/proper/commons-math/) library in Kotlin code and maybe rewrite some
|
||||
parts to better suit the Kotlin programming paradigm, however there is no established roadmap for that. Feel free to
|
||||
submit a feature request if you want something to be implemented first.
|
||||
<!--* **Type-safe dimensions** Type-safe dimensions for matrix operations.-->
|
||||
|
||||
## Planned features
|
||||
<!--* **Commons-math wrapper** It is planned to gradually wrap most parts of -->
|
||||
<!--[Apache commons-math](http://commons.apache.org/proper/commons-math/) library in Kotlin code and maybe rewrite some -->
|
||||
<!--parts to better suit the Kotlin programming paradigm, however there is no established roadmap for that. Feel free to -->
|
||||
<!--submit a feature request if you want something to be implemented first.-->
|
||||
<!-- -->
|
||||
<!--## Planned features-->
|
||||
|
||||
* **Messaging** A mathematical notation to support multi-language and multi-node communication for mathematical tasks.
|
||||
<!--* **Messaging** A mathematical notation to support multi-language and multi-node communication for mathematical tasks.-->
|
||||
|
||||
* **Array statistics**
|
||||
<!--* **Array statistics** -->
|
||||
|
||||
* **Integration** Univariate and multivariate integration framework.
|
||||
<!--* **Integration** Univariate and multivariate integration framework.-->
|
||||
|
||||
* **Probability and distributions**
|
||||
<!--* **Probability and distributions**-->
|
||||
|
||||
* **Fitting** Non-linear curve fitting facilities
|
||||
<!--* **Fitting** Non-linear curve fitting facilities-->
|
||||
|
||||
## Modules
|
||||
|
||||
@ -113,10 +110,13 @@ submit a feature request if you want something to be implemented first.
|
||||
> **Maturity**: DEVELOPMENT
|
||||
>
|
||||
> **Features:**
|
||||
> - [algebras](kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt) : Algebraic structures: contexts and elements
|
||||
> - [nd](kmath-core/src/commonMain/kotlin/kscience/kmath/nd/NDStructure.kt) : Many-dimensional structures
|
||||
> - [algebras](kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt) : Algebraic structures like rings, spaces and fields.
|
||||
> - [nd](kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDStructure.kt) : Many-dimensional structures and operations on them.
|
||||
> - [linear](kmath-core/src/commonMain/kotlin/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.
|
||||
> - [buffers](kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt) : One-dimensional structure
|
||||
> - [expressions](kmath-core/src/commonMain/kotlin/kscience/kmath/expressions) : Functional Expressions
|
||||
> - [expressions](kmath-core/src/commonMain/kotlin/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.
|
||||
> - [domains](kmath-core/src/commonMain/kotlin/kscience/kmath/domains) : Domains
|
||||
> - [autodif](kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
|
||||
|
||||
@ -137,7 +137,7 @@ submit a feature request if you want something to be implemented first.
|
||||
* ### [kmath-ejml](kmath-ejml)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Maturity**: PROTOTYPE
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-for-real](kmath-for-real)
|
||||
@ -155,33 +155,40 @@ One can still use generic algebras though.
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-functions](kmath-functions)
|
||||
> Functions and interpolation
|
||||
>
|
||||
> **Maturity**: PROTOTYPE
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Features:**
|
||||
> - [piecewise](kmath-functions/Piecewise functions.) : src/commonMain/kotlin/kscience/kmath/functions/Piecewise.kt
|
||||
> - [polynomials](kmath-functions/Polynomial functions.) : src/commonMain/kotlin/kscience/kmath/functions/Polynomial.kt
|
||||
> - [linear interpolation](kmath-functions/Linear XY interpolator.) : src/commonMain/kotlin/kscience/kmath/interpolation/LinearInterpolator.kt
|
||||
> - [spline interpolation](kmath-functions/Cubic spline XY interpolator.) : src/commonMain/kotlin/kscience/kmath/interpolation/SplineInterpolator.kt
|
||||
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-geometry](kmath-geometry)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Maturity**: PROTOTYPE
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-histograms](kmath-histograms)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Maturity**: PROTOTYPE
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-kotlingrad](kmath-kotlingrad)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Maturity**: PROTOTYPE
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-memory](kmath-memory)
|
||||
> An API and basic implementation for arranging objects in a continous memory block.
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Maturity**: DEVELOPMENT
|
||||
<hr/>
|
||||
|
||||
* ### [kmath-nd4j](kmath-nd4j)
|
||||
@ -205,7 +212,7 @@ One can still use generic algebras though.
|
||||
* ### [kmath-viktor](kmath-viktor)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
> **Maturity**: DEVELOPMENT
|
||||
<hr/>
|
||||
|
||||
|
||||
@ -235,11 +242,12 @@ Release artifacts are accessible from bintray with following configuration (see
|
||||
```kotlin
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/mipt-npm/kscience")
|
||||
// maven("https://dl.bintray.com/mipt-npm/dev") for dev versions
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api("kscience.kmath:kmath-core:0.2.0-dev-4")
|
||||
// api("kscience.kmath:kmath-core-jvm:0.2.0-dev-4") for jvm-specific version
|
||||
api("kscience.kmath:kmath-core:0.2.0-dev-6")
|
||||
// api("kscience.kmath:kmath-core-jvm:0.2.0-dev-6") for jvm-specific version
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -35,10 +35,6 @@ readme {
|
||||
readmeTemplate = file("docs/templates/README-TEMPLATE.md")
|
||||
}
|
||||
|
||||
apiValidation {
|
||||
validationDisabled = true
|
||||
}
|
||||
|
||||
ksciencePublish {
|
||||
spaceRepo = "https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven"
|
||||
}
|
||||
|
54
docs/templates/README-TEMPLATE.md
vendored
54
docs/templates/README-TEMPLATE.md
vendored
@ -9,7 +9,7 @@ Bintray-dev: [ ![Download](https://api.bintray.com/packages/mipt-npm/dev/kmat
|
||||
|
||||
# KMath
|
||||
|
||||
Could be pronounced as `key-math`. The Kotlin MATHematics library was initially intended as a Kotlin-based analog to
|
||||
Could be pronounced as `key-math`. The **K**otlin **Math**ematics library was initially intended as a Kotlin-based analog to
|
||||
Python's NumPy library. Later we found that kotlin is much more flexible language and allows superior architecture
|
||||
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.
|
||||
@ -32,49 +32,46 @@ be achieved with [kmath-for-real](/kmath-for-real) extension module.
|
||||
* Provide the best performance out of the box. We have specialized libraries for that. Need only API wrappers for them.
|
||||
* Cover all cases as immediately and in one bundle. We will modularize everything and add new features gradually.
|
||||
* Provide specialized behavior in the core. API is made generic on purpose, so one needs to specialize for types, like
|
||||
for `Double` in the core. For that we will have specialization modules like `for-real`, which will give better
|
||||
for `Double` in the core. For that we will have specialization modules like `kmath-for-real`, which will give better
|
||||
experience for those, who want to work with specific types.
|
||||
|
||||
## Features
|
||||
## Features and stability
|
||||
|
||||
Current feature list is [here](/docs/features.md)
|
||||
KMath is a modular library. Different modules provide different features with different API stability guarantees. All core modules are released with the same version, but with different API change policy. The features are described in module definitions below. The module stability could have following levels:
|
||||
|
||||
* **Algebra**
|
||||
* Algebraic structures like rings, spaces and fields (**TODO** add example to wiki)
|
||||
* Basic linear algebra operations (sums, products, etc.), backed by the `Space` API.
|
||||
* Complex numbers backed by the `Field` API (meaning they will be usable in any structure like vectors and
|
||||
N-dimensional arrays).
|
||||
* Advanced linear algebra operations like matrix inversion and LU decomposition.
|
||||
* **PROTOTYPE**. On this level there are no compatibility guarantees. All methods and classes form those modules could break any moment. You can still use it, but be sure to fix the specific version.
|
||||
* **EXPERIMENTAL**. The general API is decided, but some changes could be made. Volatile API is marked with `@UnstableKmathAPI` or other stability warning annotations.
|
||||
* **DEVELOPMENT**. API breaking genrally follows semantic versioning ideology. There could be changes in minor versions, but not in patch versions. API is protected with [binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator) tool.
|
||||
* **STABLE**. The API stabilized. Breaking changes are allowed only in major releases.
|
||||
|
||||
* **Array-like structures** Full support of many-dimensional array-like structures
|
||||
including mixed arithmetic operations and function operations over arrays and numbers (with the added benefit of static type checking).
|
||||
<!--Current feature list is [here](/docs/features.md)-->
|
||||
|
||||
* **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.
|
||||
|
||||
* **Histograms** Fast multi-dimensional histograms.
|
||||
<!--* **Array-like structures** Full support of many-dimensional array-like structures -->
|
||||
<!--including mixed arithmetic operations and function operations over arrays and numbers (with the added benefit of static type checking).-->
|
||||
|
||||
* **Streaming** Streaming operations on mathematical objects and objects buffers.
|
||||
<!--* **Histograms** Fast multi-dimensional histograms.-->
|
||||
|
||||
* **Type-safe dimensions** Type-safe dimensions for matrix operations.
|
||||
<!--* **Streaming** Streaming operations on mathematical objects and objects buffers.-->
|
||||
|
||||
* **Commons-math wrapper** It is planned to gradually wrap most parts of
|
||||
[Apache commons-math](http://commons.apache.org/proper/commons-math/) library in Kotlin code and maybe rewrite some
|
||||
parts to better suit the Kotlin programming paradigm, however there is no established roadmap for that. Feel free to
|
||||
submit a feature request if you want something to be implemented first.
|
||||
<!--* **Type-safe dimensions** Type-safe dimensions for matrix operations.-->
|
||||
|
||||
## Planned features
|
||||
<!--* **Commons-math wrapper** It is planned to gradually wrap most parts of -->
|
||||
<!--[Apache commons-math](http://commons.apache.org/proper/commons-math/) library in Kotlin code and maybe rewrite some -->
|
||||
<!--parts to better suit the Kotlin programming paradigm, however there is no established roadmap for that. Feel free to -->
|
||||
<!--submit a feature request if you want something to be implemented first.-->
|
||||
<!-- -->
|
||||
<!--## Planned features-->
|
||||
|
||||
* **Messaging** A mathematical notation to support multi-language and multi-node communication for mathematical tasks.
|
||||
<!--* **Messaging** A mathematical notation to support multi-language and multi-node communication for mathematical tasks.-->
|
||||
|
||||
* **Array statistics**
|
||||
<!--* **Array statistics** -->
|
||||
|
||||
* **Integration** Univariate and multivariate integration framework.
|
||||
<!--* **Integration** Univariate and multivariate integration framework.-->
|
||||
|
||||
* **Probability and distributions**
|
||||
<!--* **Probability and distributions**-->
|
||||
|
||||
* **Fitting** Non-linear curve fitting facilities
|
||||
<!--* **Fitting** Non-linear curve fitting facilities-->
|
||||
|
||||
## Modules
|
||||
|
||||
@ -106,6 +103,7 @@ Release artifacts are accessible from bintray with following configuration (see
|
||||
```kotlin
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/mipt-npm/kscience")
|
||||
// maven("https://dl.bintray.com/mipt-npm/dev") for dev versions
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -86,3 +86,7 @@ kotlin.sourceSets.all {
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.EXPERIMENTAL
|
||||
}
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -12,7 +12,7 @@ This subproject implements the following features:
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-ast:0.2.0-dev-4`.
|
||||
> This module artifact: `kscience.kmath:kmath-ast:0.2.0-dev-6`.
|
||||
>
|
||||
> Bintray release version: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-ast/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-ast/_latestVersion)
|
||||
>
|
||||
@ -30,7 +30,7 @@ This subproject implements the following features:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-ast:0.2.0-dev-4'
|
||||
> implementation 'kscience.kmath:kmath-ast:0.2.0-dev-6'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -44,7 +44,7 @@ This subproject implements the following features:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-ast:0.2.0-dev-4")
|
||||
> implementation("kscience.kmath:kmath-ast:0.2.0-dev-6")
|
||||
> }
|
||||
> ```
|
||||
|
||||
@ -61,7 +61,7 @@ For example, the following builder:
|
||||
RealField.mstInField { symbol("x") + 2 }.compile()
|
||||
```
|
||||
|
||||
… leads to generation of bytecode, which can be decompiled to the following Java class:
|
||||
… leads to generation of bytecode, which can be decompiled to the following Java class:
|
||||
|
||||
```java
|
||||
package kscience.kmath.asm.generated;
|
||||
|
@ -10,3 +10,7 @@ dependencies {
|
||||
api(project(":kmath-functions"))
|
||||
api("org.apache.commons:commons-math3:3.6.1")
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.EXPERIMENTAL
|
||||
}
|
@ -2,17 +2,20 @@
|
||||
|
||||
The core features of KMath:
|
||||
|
||||
- [algebras](src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt) : Algebraic structures: contexts and elements
|
||||
- [nd](src/commonMain/kotlin/kscience/kmath/nd/NDStructure.kt) : Many-dimensional structures
|
||||
- [algebras](src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt) : Algebraic structures like rings, spaces and fields.
|
||||
- [nd](src/commonMain/kotlin/kscience/kmath/structures/NDStructure.kt) : Many-dimensional structures and operations on them.
|
||||
- [linear](src/commonMain/kotlin/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.
|
||||
- [buffers](src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt) : One-dimensional structure
|
||||
- [expressions](src/commonMain/kotlin/kscience/kmath/expressions) : Functional Expressions
|
||||
- [expressions](src/commonMain/kotlin/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.
|
||||
- [domains](src/commonMain/kotlin/kscience/kmath/domains) : Domains
|
||||
- [autodif](src/commonMain/kotlin/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
|
||||
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-core:0.2.0-dev-4`.
|
||||
> This module artifact: `kscience.kmath:kmath-core:0.2.0-dev-6`.
|
||||
>
|
||||
> Bintray release version: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-core/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-core/_latestVersion)
|
||||
>
|
||||
@ -30,7 +33,7 @@ The core features of KMath:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-core:0.2.0-dev-4'
|
||||
> implementation 'kscience.kmath:kmath-core:0.2.0-dev-6'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -44,6 +47,6 @@ The core features of KMath:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-core:0.2.0-dev-4")
|
||||
> implementation("kscience.kmath:kmath-core:0.2.0-dev-6")
|
||||
> }
|
||||
> ```
|
||||
|
3364
kmath-core/api/kmath-core.api
Normal file
3364
kmath-core/api/kmath-core.api
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,16 +16,26 @@ readme {
|
||||
|
||||
feature(
|
||||
id = "algebras",
|
||||
description = "Algebraic structures: contexts and elements",
|
||||
description = """
|
||||
Algebraic structures like rings, spaces and fields.
|
||||
""".trimIndent(),
|
||||
ref = "src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt"
|
||||
)
|
||||
|
||||
feature(
|
||||
id = "nd",
|
||||
description = "Many-dimensional structures",
|
||||
description = "Many-dimensional structures and operations on them.",
|
||||
ref = "src/commonMain/kotlin/kscience/kmath/structures/NDStructure.kt"
|
||||
)
|
||||
|
||||
feature(
|
||||
id = "linear",
|
||||
description = """
|
||||
Basic linear algebra operations (sums, products, etc.), backed by the `Space` API. Advanced linear algebra operations like matrix inversion and LU decomposition.
|
||||
""".trimIndent(),
|
||||
ref = "src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt"
|
||||
)
|
||||
|
||||
feature(
|
||||
id = "buffers",
|
||||
description = "One-dimensional structure",
|
||||
@ -34,7 +44,11 @@ readme {
|
||||
|
||||
feature(
|
||||
id = "expressions",
|
||||
description = "Functional Expressions",
|
||||
description = """
|
||||
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.
|
||||
""".trimIndent(),
|
||||
ref = "src/commonMain/kotlin/kscience/kmath/expressions"
|
||||
)
|
||||
|
||||
|
@ -16,3 +16,7 @@ kotlin.sourceSets {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.EXPERIMENTAL
|
||||
}
|
@ -6,3 +6,7 @@ dependencies {
|
||||
implementation("org.ejml:ejml-simple:0.39")
|
||||
implementation(project(":kmath-core"))
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-for-real:0.2.0-dev-4`.
|
||||
> This module artifact: `kscience.kmath:kmath-for-real:0.2.0-dev-6`.
|
||||
>
|
||||
> Bintray release version: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-for-real/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-for-real/_latestVersion)
|
||||
>
|
||||
@ -25,7 +25,7 @@
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-for-real:0.2.0-dev-4'
|
||||
> implementation 'kscience.kmath:kmath-for-real:0.2.0-dev-6'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -39,6 +39,6 @@
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-for-real:0.2.0-dev-4")
|
||||
> implementation("kscience.kmath:kmath-for-real:0.2.0-dev-6")
|
||||
> }
|
||||
> ```
|
||||
|
47
kmath-functions/README.md
Normal file
47
kmath-functions/README.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Functions (`kmath-functions`)
|
||||
|
||||
Functions and interpolations:
|
||||
|
||||
- [piecewise](Piecewise functions.) : src/commonMain/kotlin/kscience/kmath/functions/Piecewise.kt
|
||||
- [polynomials](Polynomial functions.) : src/commonMain/kotlin/kscience/kmath/functions/Polynomial.kt
|
||||
- [linear interpolation](Linear XY interpolator.) : src/commonMain/kotlin/kscience/kmath/interpolation/LinearInterpolator.kt
|
||||
- [spline interpolation](Cubic spline XY interpolator.) : src/commonMain/kotlin/kscience/kmath/interpolation/SplineInterpolator.kt
|
||||
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-functions:0.2.0-dev-6`.
|
||||
>
|
||||
> Bintray release version: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-functions/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-functions/_latestVersion)
|
||||
>
|
||||
> Bintray development version: [ ![Download](https://api.bintray.com/packages/mipt-npm/dev/kmath-functions/images/download.svg) ](https://bintray.com/mipt-npm/dev/kmath-functions/_latestVersion)
|
||||
>
|
||||
> **Gradle:**
|
||||
>
|
||||
> ```gradle
|
||||
> repositories {
|
||||
> maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
|
||||
> maven { url 'https://dl.bintray.com/mipt-npm/kscience' }
|
||||
> maven { url 'https://dl.bintray.com/mipt-npm/dev' }
|
||||
> maven { url 'https://dl.bintray.com/hotkeytlt/maven' }
|
||||
>
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-functions:0.2.0-dev-6'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
>
|
||||
> ```kotlin
|
||||
> repositories {
|
||||
> maven("https://dl.bintray.com/kotlin/kotlin-eap")
|
||||
> maven("https://dl.bintray.com/mipt-npm/kscience")
|
||||
> maven("https://dl.bintray.com/mipt-npm/dev")
|
||||
> maven("https://dl.bintray.com/hotkeytlt/maven")
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-functions:0.2.0-dev-6")
|
||||
> }
|
||||
> ```
|
@ -7,3 +7,14 @@ kotlin.sourceSets.commonMain {
|
||||
api(project(":kmath-core"))
|
||||
}
|
||||
}
|
||||
|
||||
readme {
|
||||
description = "Functions and interpolation"
|
||||
maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
|
||||
propertyByTemplate("artifact", rootProject.file("docs/templates/ARTIFACT-TEMPLATE.md"))
|
||||
|
||||
feature("piecewise", "src/commonMain/kotlin/kscience/kmath/functions/Piecewise.kt", "Piecewise functions.")
|
||||
feature("polynomials", "src/commonMain/kotlin/kscience/kmath/functions/Polynomial.kt", "Polynomial functions.")
|
||||
feature("linear interpolation", "src/commonMain/kotlin/kscience/kmath/interpolation/LinearInterpolator.kt", "Linear XY interpolator.")
|
||||
feature("spline interpolation", "src/commonMain/kotlin/kscience/kmath/interpolation/SplineInterpolator.kt", "Cubic spline XY interpolator.")
|
||||
}
|
7
kmath-functions/docs/README-TEMPLATE.md
Normal file
7
kmath-functions/docs/README-TEMPLATE.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Functions (`kmath-functions`)
|
||||
|
||||
Functions and interpolations:
|
||||
|
||||
${features}
|
||||
|
||||
${artifact}
|
@ -6,8 +6,7 @@ public fun interface Piecewise<T, R> {
|
||||
public fun findPiece(arg: T): R?
|
||||
}
|
||||
|
||||
public fun interface PiecewisePolynomial<T : Any> :
|
||||
Piecewise<T, Polynomial<T>>
|
||||
public fun interface PiecewisePolynomial<T : Any> : Piecewise<T, Polynomial<T>>
|
||||
|
||||
/**
|
||||
* Ordered list of pieces in piecewise function
|
||||
|
@ -5,3 +5,7 @@ kotlin.sourceSets.commonMain {
|
||||
api(project(":kmath-core"))
|
||||
}
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ import kscience.kmath.operations.invoke
|
||||
import kscience.kmath.structures.*
|
||||
import kotlin.math.floor
|
||||
|
||||
public data class BinDef<T : Comparable<T>>(
|
||||
public data class BinDefinition<T : Comparable<T>>(
|
||||
public val space: SpaceOperations<Point<T>>,
|
||||
public val center: Point<T>,
|
||||
public val sizes: Point<T>
|
||||
public val sizes: Point<T>,
|
||||
) {
|
||||
public fun contains(vector: Point<out T>): Boolean {
|
||||
require(vector.size == center.size) { "Dimension mismatch for input vector. Expected ${center.size}, but found ${vector.size}" }
|
||||
@ -22,14 +22,17 @@ public data class BinDef<T : Comparable<T>>(
|
||||
}
|
||||
|
||||
|
||||
public class MultivariateBin<T : Comparable<T>>(public val def: BinDef<T>, public override val value: Number) : Bin<T> {
|
||||
public class MultivariateBin<T : Comparable<T>>(
|
||||
public val definition: BinDefinition<T>,
|
||||
public override val value: Number,
|
||||
) : Bin<T> {
|
||||
public override val dimension: Int
|
||||
get() = def.center.size
|
||||
get() = definition.center.size
|
||||
|
||||
public override val center: Point<T>
|
||||
get() = def.center
|
||||
get() = definition.center
|
||||
|
||||
public override operator fun contains(point: Point<T>): Boolean = def.contains(point)
|
||||
public override operator fun contains(point: Point<T>): Boolean = definition.contains(point)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,11 +41,11 @@ public class MultivariateBin<T : Comparable<T>>(public val def: BinDef<T>, publi
|
||||
public class RealHistogram(
|
||||
private val lower: Buffer<Double>,
|
||||
private val upper: Buffer<Double>,
|
||||
private val binNums: IntArray = IntArray(lower.size) { 20 }
|
||||
private val binNums: IntArray = IntArray(lower.size) { 20 },
|
||||
) : MutableHistogram<Double, MultivariateBin<Double>> {
|
||||
private val strides = DefaultStrides(IntArray(binNums.size) { binNums[it] + 2 })
|
||||
private val values: NDStructure<LongCounter> = NDStructure.auto(strides) { LongCounter() }
|
||||
private val weights: NDStructure<DoubleCounter> = NDStructure.auto(strides) { DoubleCounter() }
|
||||
private val counts: NDStructure<LongCounter> = NDStructure.auto(strides) { LongCounter() }
|
||||
private val values: NDStructure<DoubleCounter> = NDStructure.auto(strides) { DoubleCounter() }
|
||||
public override val dimension: Int get() = lower.size
|
||||
private val binSize = RealBuffer(dimension) { (upper[it] - lower[it]) / binNums[it] }
|
||||
|
||||
@ -65,11 +68,11 @@ public class RealHistogram(
|
||||
|
||||
private fun getIndex(point: Buffer<out Double>): IntArray = IntArray(dimension) { getIndex(it, point[it]) }
|
||||
|
||||
private fun getValue(index: IntArray): Long = values[index].sum()
|
||||
private fun getValue(index: IntArray): Long = counts[index].sum()
|
||||
|
||||
public fun getValue(point: Buffer<out Double>): Long = getValue(getIndex(point))
|
||||
|
||||
private fun getDef(index: IntArray): BinDef<Double> {
|
||||
private fun getBinDefinition(index: IntArray): BinDefinition<Double> {
|
||||
val center = index.mapIndexed { axis, i ->
|
||||
when (i) {
|
||||
0 -> Double.NEGATIVE_INFINITY
|
||||
@ -78,14 +81,14 @@ public class RealHistogram(
|
||||
}
|
||||
}.asBuffer()
|
||||
|
||||
return BinDef(RealBufferFieldOperations, center, binSize)
|
||||
return BinDefinition(RealBufferFieldOperations, center, binSize)
|
||||
}
|
||||
|
||||
public fun getDef(point: Buffer<out Double>): BinDef<Double> = getDef(getIndex(point))
|
||||
public fun getBinDefinition(point: Buffer<out Double>): BinDefinition<Double> = getBinDefinition(getIndex(point))
|
||||
|
||||
public override operator fun get(point: Buffer<out Double>): MultivariateBin<Double>? {
|
||||
val index = getIndex(point)
|
||||
return MultivariateBin(getDef(index), getValue(index))
|
||||
return MultivariateBin(getBinDefinition(index), getValue(index))
|
||||
}
|
||||
|
||||
// fun put(point: Point<out Double>){
|
||||
@ -95,23 +98,24 @@ public class RealHistogram(
|
||||
|
||||
public override fun putWithWeight(point: Buffer<out Double>, weight: Double) {
|
||||
val index = getIndex(point)
|
||||
values[index].increment()
|
||||
weights[index].add(weight)
|
||||
counts[index].increment()
|
||||
values[index].add(weight)
|
||||
}
|
||||
|
||||
public override operator fun iterator(): Iterator<MultivariateBin<Double>> =
|
||||
weights.elements().map { (index, value) -> MultivariateBin(getDef(index), value.sum()) }
|
||||
.iterator()
|
||||
values.elements().map { (index, value) ->
|
||||
MultivariateBin(getBinDefinition(index), value.sum())
|
||||
}.iterator()
|
||||
|
||||
/**
|
||||
* Convert this histogram into NDStructure containing bin values but not bin descriptions
|
||||
* NDStructure containing number of events in bins without weights
|
||||
*/
|
||||
public fun values(): NDStructure<Number> = NDStructure.auto(values.shape) { values[it].sum() }
|
||||
public fun counts(): NDStructure<Long> = NDStructure.auto(counts.shape) { counts[it].sum() }
|
||||
|
||||
/**
|
||||
* Sum of weights
|
||||
* NDStructure containing values of bins including weights
|
||||
*/
|
||||
public fun weights(): NDStructure<Double> = NDStructure.auto(weights.shape) { weights[it].sum() }
|
||||
public fun values(): NDStructure<Double> = NDStructure.auto(values.shape) { values[it].sum() }
|
||||
|
||||
public companion object {
|
||||
/**
|
||||
|
@ -1,8 +1,10 @@
|
||||
package kscience.kmath.histogram
|
||||
|
||||
import kscience.kmath.linear.Point
|
||||
import kscience.kmath.misc.UnstableKMathAPI
|
||||
import kscience.kmath.structures.Buffer
|
||||
import kscience.kmath.structures.asBuffer
|
||||
import kscience.kmath.structures.asSequence
|
||||
import java.util.*
|
||||
import kotlin.math.floor
|
||||
|
||||
@ -11,29 +13,36 @@ import kotlin.math.floor
|
||||
public class UnivariateBin(
|
||||
public val position: Double,
|
||||
public val size: Double,
|
||||
public val counter: LongCounter = LongCounter(),
|
||||
) : Bin<Double> {
|
||||
//TODO add weighting
|
||||
public override val value: Number get() = counter.sum()
|
||||
//internal mutation operations
|
||||
internal val counter: LongCounter = LongCounter()
|
||||
internal val weightCounter: DoubleCounter = DoubleCounter()
|
||||
|
||||
/**
|
||||
* The precise number of events ignoring weighting
|
||||
*/
|
||||
public val count: Long get() = counter.sum()
|
||||
|
||||
/**
|
||||
* The value of histogram including weighting
|
||||
*/
|
||||
public override val value: Double get() = weightCounter.sum()
|
||||
|
||||
public override val center: Point<Double> get() = doubleArrayOf(position).asBuffer()
|
||||
public override val dimension: Int get() = 1
|
||||
|
||||
public operator fun contains(value: Double): Boolean = value in (position - size / 2)..(position + size / 2)
|
||||
public override fun contains(point: Buffer<Double>): Boolean = contains(point[0])
|
||||
internal operator fun inc(): UnivariateBin = this.also { counter.increment() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Univariate histogram with log(n) bin search speed
|
||||
*/
|
||||
public class UnivariateHistogram private constructor(
|
||||
private val factory: (Double) -> UnivariateBin,
|
||||
) : MutableHistogram<Double, UnivariateBin> {
|
||||
public abstract class UnivariateHistogram(
|
||||
protected val bins: TreeMap<Double, UnivariateBin> = TreeMap(),
|
||||
) : Histogram<Double, UnivariateBin> {
|
||||
|
||||
private val bins: TreeMap<Double, UnivariateBin> = TreeMap()
|
||||
|
||||
private operator fun get(value: Double): UnivariateBin? {
|
||||
public operator fun get(value: Double): UnivariateBin? {
|
||||
// check ceiling entry and return it if it is what needed
|
||||
val ceil = bins.ceilingEntry(value)?.value
|
||||
if (ceil != null && value in ceil) return ceil
|
||||
@ -44,38 +53,38 @@ public class UnivariateHistogram private constructor(
|
||||
return null
|
||||
}
|
||||
|
||||
private fun createBin(value: Double): UnivariateBin = factory(value).also {
|
||||
synchronized(this) { bins[it.position] = it }
|
||||
}
|
||||
|
||||
public override operator fun get(point: Buffer<out Double>): UnivariateBin? = get(point[0])
|
||||
|
||||
public override val dimension: Int get() = 1
|
||||
|
||||
public override operator fun iterator(): Iterator<UnivariateBin> = bins.values.iterator()
|
||||
|
||||
/**
|
||||
* Thread safe put operation
|
||||
*/
|
||||
public fun put(value: Double) {
|
||||
(get(value) ?: createBin(value)).inc()
|
||||
}
|
||||
|
||||
override fun putWithWeight(point: Buffer<out Double>, weight: Double) {
|
||||
if (weight != 1.0) TODO("Implement weighting")
|
||||
put(point[0])
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public fun uniform(binSize: Double, start: Double = 0.0): UnivariateHistogram = UnivariateHistogram { value ->
|
||||
val center = start + binSize * floor((value - start) / binSize + 0.5)
|
||||
UnivariateBin(center, binSize)
|
||||
}
|
||||
/**
|
||||
* Build a histogram with a uniform binning with a start at [start] and a bin size of [binSize]
|
||||
*/
|
||||
public fun uniformBuilder(binSize: Double, start: Double = 0.0): UnivariateHistogramBuilder =
|
||||
UnivariateHistogramBuilder { value ->
|
||||
val center = start + binSize * floor((value - start) / binSize + 0.5)
|
||||
UnivariateBin(center, binSize)
|
||||
}
|
||||
|
||||
public fun custom(borders: DoubleArray): UnivariateHistogram {
|
||||
/**
|
||||
* Build and fill a [UnivariateHistogram]. Returns a read-only histogram.
|
||||
*/
|
||||
public fun uniform(
|
||||
binSize: Double,
|
||||
start: Double = 0.0,
|
||||
builder: UnivariateHistogramBuilder.() -> Unit,
|
||||
): UnivariateHistogram = uniformBuilder(binSize, start).apply(builder)
|
||||
|
||||
/**
|
||||
* Create a histogram with custom cell borders
|
||||
*/
|
||||
public fun customBuilder(borders: DoubleArray): UnivariateHistogramBuilder {
|
||||
val sorted = borders.sortedArray()
|
||||
|
||||
return UnivariateHistogram { value ->
|
||||
return UnivariateHistogramBuilder { value ->
|
||||
when {
|
||||
value < sorted.first() -> UnivariateBin(
|
||||
Double.NEGATIVE_INFINITY,
|
||||
@ -96,7 +105,55 @@ public class UnivariateHistogram private constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build and fill a histogram with custom borders. Returns a read-only histogram.
|
||||
*/
|
||||
public fun custom(
|
||||
borders: DoubleArray,
|
||||
builder: UnivariateHistogramBuilder.() -> Unit,
|
||||
): UnivariateHistogram = customBuilder(borders).apply(builder)
|
||||
}
|
||||
}
|
||||
|
||||
public fun UnivariateHistogram.fill(sequence: Iterable<Double>): Unit = sequence.forEach(::put)
|
||||
public class UnivariateHistogramBuilder(
|
||||
private val factory: (Double) -> UnivariateBin,
|
||||
) : UnivariateHistogram(), MutableHistogram<Double, UnivariateBin> {
|
||||
|
||||
private fun createBin(value: Double): UnivariateBin = factory(value).also {
|
||||
synchronized(this) { bins[it.position] = it }
|
||||
}
|
||||
|
||||
/**
|
||||
* Thread safe put operation
|
||||
*/
|
||||
public fun put(value: Double, weight: Double = 1.0) {
|
||||
(get(value) ?: createBin(value)).apply{
|
||||
counter.increment()
|
||||
weightCounter.add(weight)
|
||||
}
|
||||
}
|
||||
|
||||
override fun putWithWeight(point: Buffer<out Double>, weight: Double) {
|
||||
put(point[0], weight)
|
||||
}
|
||||
|
||||
/**
|
||||
* Put several items into a single bin
|
||||
*/
|
||||
public fun putMany(value: Double, count: Int, weight: Double = count.toDouble()){
|
||||
(get(value) ?: createBin(value)).apply{
|
||||
counter.add(count.toLong())
|
||||
weightCounter.add(weight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@UnstableKMathAPI
|
||||
public fun UnivariateHistogramBuilder.fill(items: Iterable<Double>): Unit = items.forEach(::put)
|
||||
|
||||
@UnstableKMathAPI
|
||||
public fun UnivariateHistogramBuilder.fill(array: DoubleArray): Unit = array.forEach(::put)
|
||||
|
||||
@UnstableKMathAPI
|
||||
public fun UnivariateHistogramBuilder.fill(buffer: Buffer<Double>): Unit = buffer.asSequence().forEach(::put)
|
@ -7,3 +7,7 @@ dependencies {
|
||||
implementation("com.github.breandan:kotlingrad:0.4.0")
|
||||
api(project(":kmath-ast"))
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.PROTOTYPE
|
||||
}
|
72
kmath-memory/api/kmath-memory.api
Normal file
72
kmath-memory/api/kmath-memory.api
Normal file
@ -0,0 +1,72 @@
|
||||
public final class kscience/kmath/memory/ByteBufferMemory : kscience/kmath/memory/Memory {
|
||||
public fun <init> (Ljava/nio/ByteBuffer;II)V
|
||||
public synthetic fun <init> (Ljava/nio/ByteBuffer;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun copy ()Lkscience/kmath/memory/Memory;
|
||||
public final fun getBuffer ()Ljava/nio/ByteBuffer;
|
||||
public fun getSize ()I
|
||||
public final fun getStartOffset ()I
|
||||
public fun reader ()Lkscience/kmath/memory/MemoryReader;
|
||||
public fun view (II)Lkscience/kmath/memory/Memory;
|
||||
public fun writer ()Lkscience/kmath/memory/MemoryWriter;
|
||||
}
|
||||
|
||||
public final class kscience/kmath/memory/ByteBufferMemoryKt {
|
||||
public static final fun allocate (Lkscience/kmath/memory/Memory$Companion;I)Lkscience/kmath/memory/Memory;
|
||||
public static final fun asMemory (Ljava/nio/ByteBuffer;II)Lkscience/kmath/memory/Memory;
|
||||
public static synthetic fun asMemory$default (Ljava/nio/ByteBuffer;IIILjava/lang/Object;)Lkscience/kmath/memory/Memory;
|
||||
public static final fun readAsMemory (Ljava/nio/file/Path;JJLkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static synthetic fun readAsMemory$default (Ljava/nio/file/Path;JJLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun wrap (Lkscience/kmath/memory/Memory$Companion;[B)Lkscience/kmath/memory/Memory;
|
||||
}
|
||||
|
||||
public abstract interface class kscience/kmath/memory/Memory {
|
||||
public static final field Companion Lkscience/kmath/memory/Memory$Companion;
|
||||
public abstract fun copy ()Lkscience/kmath/memory/Memory;
|
||||
public abstract fun getSize ()I
|
||||
public abstract fun reader ()Lkscience/kmath/memory/MemoryReader;
|
||||
public abstract fun view (II)Lkscience/kmath/memory/Memory;
|
||||
public abstract fun writer ()Lkscience/kmath/memory/MemoryWriter;
|
||||
}
|
||||
|
||||
public final class kscience/kmath/memory/Memory$Companion {
|
||||
}
|
||||
|
||||
public final class kscience/kmath/memory/MemoryKt {
|
||||
public static final fun read (Lkscience/kmath/memory/Memory;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun write (Lkscience/kmath/memory/Memory;Lkotlin/jvm/functions/Function1;)V
|
||||
}
|
||||
|
||||
public abstract interface class kscience/kmath/memory/MemoryReader {
|
||||
public abstract fun getMemory ()Lkscience/kmath/memory/Memory;
|
||||
public abstract fun readByte (I)B
|
||||
public abstract fun readDouble (I)D
|
||||
public abstract fun readFloat (I)F
|
||||
public abstract fun readInt (I)I
|
||||
public abstract fun readLong (I)J
|
||||
public abstract fun readShort (I)S
|
||||
public abstract fun release ()V
|
||||
}
|
||||
|
||||
public abstract interface class kscience/kmath/memory/MemorySpec {
|
||||
public abstract fun getObjectSize ()I
|
||||
public abstract fun read (Lkscience/kmath/memory/MemoryReader;I)Ljava/lang/Object;
|
||||
public abstract fun write (Lkscience/kmath/memory/MemoryWriter;ILjava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class kscience/kmath/memory/MemorySpecKt {
|
||||
public static final fun read (Lkscience/kmath/memory/MemoryReader;Lkscience/kmath/memory/MemorySpec;I)Ljava/lang/Object;
|
||||
public static final fun write (Lkscience/kmath/memory/MemoryWriter;Lkscience/kmath/memory/MemorySpec;ILjava/lang/Object;)V
|
||||
public static final fun writeArray (Lkscience/kmath/memory/MemoryWriter;Lkscience/kmath/memory/MemorySpec;I[Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class kscience/kmath/memory/MemoryWriter {
|
||||
public abstract fun getMemory ()Lkscience/kmath/memory/Memory;
|
||||
public abstract fun release ()V
|
||||
public abstract fun writeByte (IB)V
|
||||
public abstract fun writeDouble (ID)V
|
||||
public abstract fun writeFloat (IF)V
|
||||
public abstract fun writeInt (II)V
|
||||
public abstract fun writeLong (IJ)V
|
||||
public abstract fun writeShort (IS)V
|
||||
}
|
||||
|
@ -2,3 +2,10 @@ plugins {
|
||||
id("ru.mipt.npm.mpp")
|
||||
id("ru.mipt.npm.native")
|
||||
}
|
||||
|
||||
readme{
|
||||
description = """
|
||||
An API and basic implementation for arranging objects in a continous memory block.
|
||||
""".trimIndent()
|
||||
maturity = ru.mipt.npm.gradle.Maturity.DEVELOPMENT
|
||||
}
|
@ -9,7 +9,7 @@ This subproject implements the following features:
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-nd4j:0.2.0-dev-4`.
|
||||
> This module artifact: `kscience.kmath:kmath-nd4j:0.2.0-dev-6`.
|
||||
>
|
||||
> Bintray release version: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-nd4j/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-nd4j/_latestVersion)
|
||||
>
|
||||
@ -27,7 +27,7 @@ This subproject implements the following features:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-nd4j:0.2.0-dev-4'
|
||||
> implementation 'kscience.kmath:kmath-nd4j:0.2.0-dev-6'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -41,7 +41,7 @@ This subproject implements the following features:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-nd4j:0.2.0-dev-4")
|
||||
> implementation("kscience.kmath:kmath-nd4j:0.2.0-dev-6")
|
||||
> }
|
||||
> ```
|
||||
|
||||
|
@ -24,3 +24,7 @@ kotlin.sourceSets {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.EXPERIMENTAL
|
||||
}
|
189
kmath-viktor/api/kmath-viktor.api
Normal file
189
kmath-viktor/api/kmath-viktor.api
Normal file
@ -0,0 +1,189 @@
|
||||
public final class kscience/kmath/viktor/ViktorBuffer : kscience/kmath/structures/MutableBuffer {
|
||||
public static final synthetic fun box-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Lkscience/kmath/viktor/ViktorBuffer;
|
||||
public static fun constructor-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Lorg/jetbrains/bio/viktor/F64FlatArray;
|
||||
public fun contentEquals (Lkscience/kmath/structures/Buffer;)Z
|
||||
public static fun contentEquals-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;Lkscience/kmath/structures/Buffer;)Z
|
||||
public fun copy ()Lkscience/kmath/structures/MutableBuffer;
|
||||
public static fun copy-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Lkscience/kmath/structures/MutableBuffer;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;Ljava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (Lorg/jetbrains/bio/viktor/F64FlatArray;Lorg/jetbrains/bio/viktor/F64FlatArray;)Z
|
||||
public fun get (I)Ljava/lang/Double;
|
||||
public synthetic fun get (I)Ljava/lang/Object;
|
||||
public static fun get-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;I)Ljava/lang/Double;
|
||||
public final fun getFlatArray ()Lorg/jetbrains/bio/viktor/F64FlatArray;
|
||||
public fun getSize ()I
|
||||
public static fun getSize-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)I
|
||||
public fun hashCode ()I
|
||||
public static fun hashCode-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)I
|
||||
public fun iterator ()Ljava/util/Iterator;
|
||||
public static fun iterator-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Ljava/util/Iterator;
|
||||
public fun set (ID)V
|
||||
public synthetic fun set (ILjava/lang/Object;)V
|
||||
public static fun set-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;ID)V
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public static fun toString-impl (Lorg/jetbrains/bio/viktor/F64FlatArray;)Ljava/lang/String;
|
||||
public final synthetic fun unbox-impl ()Lorg/jetbrains/bio/viktor/F64FlatArray;
|
||||
}
|
||||
|
||||
public final class kscience/kmath/viktor/ViktorNDField : kscience/kmath/nd/NDField, kscience/kmath/operations/ExtendedField, kscience/kmath/operations/RingWithNumbers {
|
||||
public fun <init> ([I)V
|
||||
public synthetic fun acos (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun acos-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun acosh (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun acosh (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun add (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public synthetic fun add (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun add-frQ_39w (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun asin (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun asin-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun asinh (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun asinh (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun atan (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun atan-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun atanh (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun atanh (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun binaryOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun binaryOperation (Ljava/lang/String;Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun binaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
|
||||
public synthetic fun combine (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;Lkotlin/jvm/functions/Function3;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun combine-C8Lp-Ak (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;Lkotlin/jvm/functions/Function3;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun cos (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun cos-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun cosh (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun cosh (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun div (DLkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun div (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun div (Ljava/lang/Number;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
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 synthetic fun div (Ljava/lang/Object;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun div (Lkscience/kmath/nd/NDStructure;D)Lkscience/kmath/nd/NDStructure;
|
||||
public fun div (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun div (Lkscience/kmath/nd/NDStructure;Ljava/lang/Object;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun div (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun divide (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun divide (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun exp (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun exp-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun getElementContext ()Ljava/lang/Object;
|
||||
public fun getElementContext ()Lkscience/kmath/operations/RealField;
|
||||
public final fun getF64Buffer (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun getOne ()Ljava/lang/Object;
|
||||
public fun getOne-hHuhEO0 ()Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun getShape ()[I
|
||||
public synthetic fun getZero ()Ljava/lang/Object;
|
||||
public fun getZero-hHuhEO0 ()Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun invoke (Lkotlin/jvm/functions/Function1;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
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;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun leftSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
|
||||
public synthetic fun ln (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun ln-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun map (Lkscience/kmath/nd/NDStructure;Lkotlin/jvm/functions/Function2;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun map-frQ_39w (Lkscience/kmath/nd/NDStructure;Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun mapIndexed (Lkscience/kmath/nd/NDStructure;Lkotlin/jvm/functions/Function3;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun mapIndexed-frQ_39w (Lkscience/kmath/nd/NDStructure;Lkotlin/jvm/functions/Function3;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun minus (DLkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun minus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun minus (Ljava/lang/Number;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
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 synthetic fun minus (Ljava/lang/Object;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun minus (Lkscience/kmath/nd/NDStructure;D)Lkscience/kmath/nd/NDStructure;
|
||||
public fun minus (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun minus (Lkscience/kmath/nd/NDStructure;Ljava/lang/Object;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun minus (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun minus-frQ_39w (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
|
||||
public synthetic fun multiply (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public synthetic fun multiply (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun multiply (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun multiply-frQ_39w (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun number (Ljava/lang/Number;)Ljava/lang/Object;
|
||||
public fun number-02gLDOA (Ljava/lang/Number;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun plus (DLkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun plus (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun plus (Ljava/lang/Number;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
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 synthetic fun plus (Ljava/lang/Object;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun plus (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun plus (Lkscience/kmath/nd/NDStructure;Ljava/lang/Object;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun plus (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun plus-frQ_39w (Lkscience/kmath/nd/NDStructure;D)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun plus-frQ_39w (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun pow (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
|
||||
public fun pow (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun power (Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
|
||||
public fun power-frQ_39w (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun produce (Lkotlin/jvm/functions/Function2;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun produce-02gLDOA (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun rightSideNumberOperation (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Number;)Ljava/lang/Object;
|
||||
public fun rightSideNumberOperation (Ljava/lang/String;Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun rightSideNumberOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function2;
|
||||
public synthetic fun sin (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun sin-02gLDOA (Lkscience/kmath/nd/NDStructure;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun sinh (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun sinh (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun sqrt (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun sqrt (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun symbol (Ljava/lang/String;)Ljava/lang/Object;
|
||||
public fun symbol (Ljava/lang/String;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun tan (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun tan (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun tanh (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun tanh (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun times (DLkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun times (Ljava/lang/Number;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun times (Ljava/lang/Number;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
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 synthetic fun times (Ljava/lang/Object;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun times (Lkscience/kmath/nd/NDStructure;D)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun times (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun times (Lkscience/kmath/nd/NDStructure;Ljava/lang/Object;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun times (Lkscience/kmath/nd/NDStructure;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun times-frQ_39w (Lkscience/kmath/nd/NDStructure;Ljava/lang/Number;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public synthetic fun unaryMinus (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun unaryMinus (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public synthetic fun unaryOperation (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun unaryOperation (Ljava/lang/String;Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
public fun unaryOperationFunction (Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
|
||||
public synthetic fun unaryPlus (Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public fun unaryPlus (Lkscience/kmath/nd/NDStructure;)Lkscience/kmath/nd/NDStructure;
|
||||
}
|
||||
|
||||
public final class kscience/kmath/viktor/ViktorNDStructure : kscience/kmath/nd/MutableNDStructure {
|
||||
public static final synthetic fun box-impl (Lorg/jetbrains/bio/viktor/F64Array;)Lkscience/kmath/viktor/ViktorNDStructure;
|
||||
public static fun constructor-impl (Lorg/jetbrains/bio/viktor/F64Array;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun elements ()Lkotlin/sequences/Sequence;
|
||||
public static fun elements-impl (Lorg/jetbrains/bio/viktor/F64Array;)Lkotlin/sequences/Sequence;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (Lorg/jetbrains/bio/viktor/F64Array;Ljava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (Lorg/jetbrains/bio/viktor/F64Array;Lorg/jetbrains/bio/viktor/F64Array;)Z
|
||||
public fun get ([I)Ljava/lang/Double;
|
||||
public synthetic fun get ([I)Ljava/lang/Object;
|
||||
public static fun get-impl (Lorg/jetbrains/bio/viktor/F64Array;[I)Ljava/lang/Double;
|
||||
public fun getDimension ()I
|
||||
public static fun getDimension-impl (Lorg/jetbrains/bio/viktor/F64Array;)I
|
||||
public final fun getF64Buffer ()Lorg/jetbrains/bio/viktor/F64Array;
|
||||
public fun getFeature (Lkotlin/reflect/KClass;)Ljava/lang/Object;
|
||||
public static fun getFeature-impl (Lorg/jetbrains/bio/viktor/F64Array;Lkotlin/reflect/KClass;)Ljava/lang/Object;
|
||||
public fun getShape ()[I
|
||||
public static fun getShape-impl (Lorg/jetbrains/bio/viktor/F64Array;)[I
|
||||
public fun hashCode ()I
|
||||
public static fun hashCode-impl (Lorg/jetbrains/bio/viktor/F64Array;)I
|
||||
public fun set ([ID)V
|
||||
public synthetic fun set ([ILjava/lang/Object;)V
|
||||
public static fun set-impl (Lorg/jetbrains/bio/viktor/F64Array;[ID)V
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public static fun toString-impl (Lorg/jetbrains/bio/viktor/F64Array;)Ljava/lang/String;
|
||||
public final synthetic fun unbox-impl ()Lorg/jetbrains/bio/viktor/F64Array;
|
||||
}
|
||||
|
||||
public final class kscience/kmath/viktor/ViktorNDStructureKt {
|
||||
public static final fun ViktorNDField ([I)Lkscience/kmath/viktor/ViktorNDField;
|
||||
public static final fun asStructure (Lorg/jetbrains/bio/viktor/F64Array;)Lorg/jetbrains/bio/viktor/F64Array;
|
||||
}
|
||||
|
@ -8,3 +8,7 @@ dependencies {
|
||||
api(project(":kmath-core"))
|
||||
api("org.jetbrains.bio:viktor:1.0.1")
|
||||
}
|
||||
|
||||
readme{
|
||||
maturity = ru.mipt.npm.gradle.Maturity.DEVELOPMENT
|
||||
}
|
@ -8,7 +8,7 @@ pluginManagement {
|
||||
maven("https://dl.bintray.com/kotlin/kotlinx")
|
||||
}
|
||||
|
||||
val toolsVersion = "0.7.3-1.4.30-RC"
|
||||
val toolsVersion = "0.7.4"
|
||||
val kotlinVersion = "1.4.30-RC"
|
||||
|
||||
plugins {
|
||||
|
Loading…
Reference in New Issue
Block a user