Skip to content

Commit

Permalink
Update changelog and Readme for 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
altavir committed Jan 12, 2025
1 parent b2b64f3 commit c9d1de4
Show file tree
Hide file tree
Showing 28 changed files with 89 additions and 186 deletions.
23 changes: 17 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,34 @@
## Unreleased

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

## 0.4.1 - 2025-01-12

### Added

- Metropolis-Hastings sampler
- Ojalgo `LinearSpace` implementation.

### Changed

- attributes-kt moved to a separate project, and the version used is 0.3.0
- Kotlin 2.1. Now use cross-compilation to deploy macOS targets.
- Changed `origin` to `cmMatrix` in kmath-commons to avoid property name clash. Expose bidirectional conversion in `CMLinearSpace`
- (BREAKING CHANGE) Changed implementations in `kmath-ejml` to match CM and ojalgo style. Specifically, provide bidirectional conversion for library types.

### Deprecated

### Removed

### Fixed
- (BREAKING CHANGE) Fix EJML to properly treat vectors as columns

### Security
- (BREAKING CHANGE) Fix EJML to properly treat vectors as columns

## 0.4.0 - 2024-02-18

Expand Down
21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ module definitions below. The module stability could have the following levels:
## Modules


### [attributes-kt](attributes-kt)
> An API and basic implementation for arranging objects in a continuous memory block.
>
> **Maturity**: DEVELOPMENT
### [benchmarks](benchmarks)
>
> **Maturity**: EXPERIMENTAL
Expand Down Expand Up @@ -107,8 +102,6 @@ module definitions below. The module stability could have the following levels:
> - [linear](kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt) : Basic linear algebra operations (sums, products, etc.), backed by the `Space` API. Advanced linear algebra operations like matrix inversion and LU decomposition.
> - [buffers](kmath-core/src/commonMain/kotlin/space/kscience/kmath/structures/Buffers.kt) : One-dimensional structure
> - [expressions](kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions) : By writing a single mathematical expression once, users will be able to apply different types of
objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high
performance calculations to code generation.
> - [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
> - [Parallel linear algebra](kmath-core/#) : Parallel implementation for `LinearAlgebra`
Expand Down Expand Up @@ -167,15 +160,6 @@ One can still use generic algebras though.
>
> **Maturity**: PROTOTYPE
### [kmath-jafama](kmath-jafama)
> Jafama integration module
>
> **Maturity**: DEPRECATED
>
> **Features:**
> - [jafama-double](kmath-jafama/src/main/kotlin/space/kscience/kmath/jafama/) : Double ExtendedField implementations based on Jafama

### [kmath-jupyter](kmath-jupyter)
>
> **Maturity**: PROTOTYPE
Expand Down Expand Up @@ -211,6 +195,11 @@ One can still use generic algebras though.
> - [nd4jarrayfields](kmath-nd4j/#) : Fields over Nd4jArrayStructure of Float and Double

### [kmath-ojalgo](kmath-ojalgo)
> Ojalgo bindings for kmath
>
> **Maturity**: PROTOTYPE
### [kmath-optimization](kmath-optimization)
>
> **Maturity**: EXPERIMENTAL
Expand Down
114 changes: 0 additions & 114 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,119 +1,5 @@
# BenchmarksResult

## Report for benchmark configuration <code>main</code>

* Run on Java HotSpot(TM) 64-Bit Server VM (build 21.0.4+8-LTS-jvmci-23.1-b41) with Java process:

```
C:\Users\altavir\scoop\apps\graalvm-oracle-21jdk\current\bin\java.exe -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCIProduct -XX:-UnlockExperimentalVMOptions -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant
```
* JMH 1.21 was used in `thrpt` mode with 5 warmup iterations by 10 s and 5 measurement iterations by 10 s.
### [ArrayBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ArrayBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`benchmarkArrayRead`|1.9E+07 &plusmn; 2.3E+05 ops/s|
|`benchmarkBufferRead`|1.4E+07 &plusmn; 8.7E+05 ops/s|
|`nativeBufferRead`|1.4E+07 &plusmn; 1.3E+06 ops/s|
### [BigIntBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BigIntBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`jvmAdd`|5.1E+07 &plusmn; 1.3E+06 ops/s|
|`jvmAddLarge`|5.1E+04 &plusmn; 8.2E+02 ops/s|
|`jvmMultiply`|8.5E+07 &plusmn; 9.7E+06 ops/s|
|`jvmMultiplyLarge`|2.5E+02 &plusmn; 15 ops/s|
|`jvmParsing10`|8.7E+06 &plusmn; 5.1E+05 ops/s|
|`jvmParsing16`|6.4E+06 &plusmn; 1.8E+05 ops/s|
|`jvmPower`|28 &plusmn; 0.79 ops/s|
|`jvmSmallAdd`|7.0E+07 &plusmn; 4.3E+06 ops/s|
|`kmAdd`|4.8E+07 &plusmn; 2.2E+06 ops/s|
|`kmAddLarge`|3.5E+04 &plusmn; 3.7E+03 ops/s|
|`kmMultiply`|6.7E+07 &plusmn; 1.5E+07 ops/s|
|`kmMultiplyLarge`|54 &plusmn; 4.2 ops/s|
|`kmParsing10`|4.5E+06 &plusmn; 8.3E+04 ops/s|
|`kmParsing16`|4.9E+06 &plusmn; 1.1E+05 ops/s|
|`kmPower`|10 &plusmn; 0.96 ops/s|
|`kmSmallAdd`|4.1E+07 &plusmn; 5.9E+05 ops/s|
### [BufferBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/BufferBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`bufferViewReadWrite`|5.8E+06 &plusmn; 1.6E+05 ops/s|
|`bufferViewReadWriteSpecialized`|5.6E+06 &plusmn; 2.6E+05 ops/s|
|`complexBufferReadWrite`|6.6E+06 &plusmn; 2.7E+05 ops/s|
|`doubleArrayReadWrite`|7.5E+06 &plusmn; 1.0E+06 ops/s|
|`doubleBufferReadWrite`|8.0E+06 &plusmn; 6.7E+05 ops/s|
### [DotBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/DotBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`bufferedDot`|1.3 &plusmn; 0.020 ops/s|
|`cmDot`|0.47 &plusmn; 0.42 ops/s|
|`cmDotWithConversion`|0.76 &plusmn; 0.13 ops/s|
|`ejmlDot`|6.7 &plusmn; 0.091 ops/s|
|`ejmlDotWithConversion`|6.4 &plusmn; 0.82 ops/s|
|`multikDot`|40 &plusmn; 6.7 ops/s|
|`parallelDot`|12 &plusmn; 1.8 ops/s|
|`tensorDot`|1.2 &plusmn; 0.041 ops/s|
|`tfDot`|5.9 &plusmn; 0.49 ops/s|
### [ExpressionsInterpretersBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ExpressionsInterpretersBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`asmGenericExpression`|29 &plusmn; 1.2 ops/s|
|`asmPrimitiveExpression`|43 &plusmn; 1.3 ops/s|
|`asmPrimitiveExpressionArray`|71 &plusmn; 0.38 ops/s|
|`functionalExpression`|5.6 &plusmn; 0.11 ops/s|
|`justCalculate`|69 &plusmn; 9.0 ops/s|
|`mstExpression`|7.1 &plusmn; 0.020 ops/s|
|`rawExpression`|41 &plusmn; 1.5 ops/s|
### [IntegrationBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/IntegrationBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`complexIntegration`|3.6E+03 &plusmn; 1.9E+02 ops/s|
|`doubleIntegration`|3.7E+03 &plusmn; 12 ops/s|
### [JafamaBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/JafamaBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`core`|38 &plusmn; 0.64 ops/s|
|`jafama`|52 &plusmn; 0.36 ops/s|
|`strictJafama`|52 &plusmn; 4.0 ops/s|
### [MatrixInverseBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/MatrixInverseBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`cmLUPInversion`|2.2E+03 &plusmn; 76 ops/s|
|`ejmlInverse`|1.3E+03 &plusmn; 5.7 ops/s|
|`kmathLupInversion`|9.5E+02 &plusmn; 1.8E+02 ops/s|
|`kmathParallelLupInversion`|9.1E+02 &plusmn; 1.4E+02 ops/s|
### [NDFieldBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/NDFieldBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`boxingFieldAdd`|7.7 &plusmn; 0.79 ops/s|
|`multikAdd`|6.5 &plusmn; 0.33 ops/s|
|`multikInPlaceAdd`|64 &plusmn; 0.79 ops/s|
|`specializedFieldAdd`|8.0 &plusmn; 0.090 ops/s|
|`tensorAdd`|9.2 &plusmn; 0.053 ops/s|
|`tensorInPlaceAdd`|17 &plusmn; 10 ops/s|
|`viktorAdd`|7.6 &plusmn; 1.2 ops/s|
### [ViktorBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`doubleFieldAddition`|7.7 &plusmn; 0.34 ops/s|
|`rawViktor`|5.9 &plusmn; 1.1 ops/s|
|`viktorFieldAddition`|7.3 &plusmn; 1.1 ops/s|
### [ViktorLogBenchmark](src/jvmMain/kotlin/space/kscience/kmath/benchmarks/ViktorLogBenchmark.kt)

| Benchmark | Score |
|:---------:|:-----:|
|`rawViktorLog`|1.4 &plusmn; 0.076 ops/s|
|`realFieldLog`|1.3 &plusmn; 0.069 ops/s|
|`viktorFieldLog`|1.3 &plusmn; 0.032 ops/s|



4 changes: 1 addition & 3 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.benchmark.gradle.BenchmarksExtension
import java.time.LocalDateTime
import java.time.ZoneId
import java.util.*

plugins {
Expand Down Expand Up @@ -228,7 +226,7 @@ readme {

property(propertyName) {
val resDirectory = launches.listFiles()?.maxByOrNull {
LocalDateTime.parse(it.name).atZone(ZoneId.systemDefault()).toInstant()
it.nameWithoutExtension
}

if (resDirectory == null || !(resDirectory.resolve("jvm.json")).exists()) {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ allprojects {
}

group = "space.kscience"
version = "0.4.1-dev"
version = "0.4.1"
}

dependencies{
Expand Down
4 changes: 2 additions & 2 deletions kmath-ast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Extensions to MST API: transformations, dynamic compilation and visualization.

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-ast:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-ast:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -20,7 +20,7 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-ast:0.4.0")
implementation("space.kscience:kmath-ast:0.4.1")
}
```

Expand Down
4 changes: 2 additions & 2 deletions kmath-commons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Commons math binding for kmath

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-commons:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-commons:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -16,6 +16,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-commons:0.4.0")
implementation("space.kscience:kmath-commons:0.4.1")
}
```
4 changes: 2 additions & 2 deletions kmath-complex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Complex and hypercomplex number systems in KMath.

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-complex:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-complex:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -18,6 +18,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-complex:0.4.0")
implementation("space.kscience:kmath-complex:0.4.1")
}
```
6 changes: 2 additions & 4 deletions kmath-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ The core interfaces of KMath.
- [linear](src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt) : Basic linear algebra operations (sums, products, etc.), backed by the `Space` API. Advanced linear algebra operations like matrix inversion and LU decomposition.
- [buffers](src/commonMain/kotlin/space/kscience/kmath/structures/Buffers.kt) : One-dimensional structure
- [expressions](src/commonMain/kotlin/space/kscience/kmath/expressions) : By writing a single mathematical expression once, users will be able to apply different types of
objects to the expression by providing a context. Expressions can be used for a wide variety of purposes from high
performance calculations to code generation.
- [domains](src/commonMain/kotlin/space/kscience/kmath/domains) : Domains
- [autodiff](src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt) : Automatic differentiation
- [Parallel linear algebra](#) : Parallel implementation for `LinearAlgebra`


## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-core:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-core:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -26,6 +24,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-core:0.4.0")
implementation("space.kscience:kmath-core:0.4.1")
}
```
4 changes: 2 additions & 2 deletions kmath-coroutines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-coroutines:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-coroutines:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -16,6 +16,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-coroutines:0.4.0")
implementation("space.kscience:kmath-coroutines:0.4.1")
}
```
4 changes: 2 additions & 2 deletions kmath-dimensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A proof of concept module for adding type-safe dimensions to structures

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-dimensions:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-dimensions:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -16,6 +16,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-dimensions:0.4.0")
implementation("space.kscience:kmath-dimensions:0.4.1")
}
```
4 changes: 2 additions & 2 deletions kmath-ejml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ EJML based linear algebra implementation.

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-ejml:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-ejml:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -19,6 +19,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-ejml:0.4.0")
implementation("space.kscience:kmath-ejml:0.4.1")
}
```
4 changes: 2 additions & 2 deletions kmath-for-real/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Specialization of KMath APIs for Double numbers.

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-for-real:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-for-real:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -19,6 +19,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-for-real:0.4.0")
implementation("space.kscience:kmath-for-real:0.4.1")
}
```
4 changes: 2 additions & 2 deletions kmath-functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Functions and interpolations.

## Artifact:

The Maven coordinates of this project are `space.kscience:kmath-functions:0.4.0`.
The Maven coordinates of this project are `space.kscience:kmath-functions:0.4.1`.

**Gradle Kotlin DSL:**
```kotlin
Expand All @@ -21,6 +21,6 @@ repositories {
}

dependencies {
implementation("space.kscience:kmath-functions:0.4.0")
implementation("space.kscience:kmath-functions:0.4.1")
}
```
Loading

0 comments on commit c9d1de4

Please sign in to comment.