forked from kscience/kmath
Merge remote-tracking branch 'space/dev' into refactor/histograms
This commit is contained in:
commit
ee29b218f0
@ -257,8 +257,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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
|
||||
api("kscience.kmath:kmath-core:0.2.0-dev-7")
|
||||
// api("kscience.kmath:kmath-core-jvm:0.2.0-dev-7") for jvm-specific version
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package kscience.kmath.benchmarks
|
||||
|
||||
import kscience.kmath.operations.Complex
|
||||
import kscience.kmath.operations.complex
|
||||
import kscience.kmath.complex.Complex
|
||||
import kscience.kmath.complex.complex
|
||||
import kscience.kmath.structures.MutableBuffer
|
||||
import kscience.kmath.structures.RealBuffer
|
||||
import org.openjdk.jmh.annotations.Benchmark
|
||||
|
@ -12,7 +12,7 @@ This subproject implements the following features:
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-ast:0.2.0-dev-6`.
|
||||
> This module artifact: `kscience.kmath:kmath-ast:0.2.0-dev-7`.
|
||||
>
|
||||
> 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-6'
|
||||
> implementation 'kscience.kmath:kmath-ast:0.2.0-dev-7'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -44,7 +44,7 @@ This subproject implements the following features:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-ast:0.2.0-dev-6")
|
||||
> implementation("kscience.kmath:kmath-ast:0.2.0-dev-7")
|
||||
> }
|
||||
> ```
|
||||
|
||||
@ -75,7 +75,7 @@ import kscience.kmath.expressions.Symbol;
|
||||
public final class AsmCompiledExpression_45045_0 implements Expression<Double> {
|
||||
private final Object[] constants;
|
||||
|
||||
public final Double invoke(Map<Symbol, Double> arguments) {
|
||||
public final Double invoke(Map<Symbol, ? extends Double> arguments) {
|
||||
return (Double)((Function2)this.constants[0]).invoke((Double)MapIntrinsics.getOrFail(arguments, "x"), 2);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ import kscience.kmath.expressions.Symbol;
|
||||
public final class AsmCompiledExpression_45045_0 implements Expression<Double> {
|
||||
private final Object[] constants;
|
||||
|
||||
public final Double invoke(Map<Symbol, Double> arguments) {
|
||||
public final Double invoke(Map<Symbol, ? extends Double> arguments) {
|
||||
return (Double)((Function2)this.constants[0]).invoke((Double)MapIntrinsics.getOrFail(arguments, "x"), 2);
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ internal class AsmBuilder<T>(
|
||||
ACC_PUBLIC or ACC_FINAL,
|
||||
"invoke",
|
||||
getMethodDescriptor(tType, MAP_TYPE),
|
||||
"(L${MAP_TYPE.internalName}<${SYMBOL_TYPE.descriptor}${if (Modifier.isFinal(classOfT.modifiers)) "" else "+"}${tType.descriptor}>;)${tType.descriptor}",
|
||||
"(L${MAP_TYPE.internalName}<${SYMBOL_TYPE.descriptor}+${tType.descriptor}>;)${tType.descriptor}",
|
||||
null,
|
||||
).instructionAdapter {
|
||||
invokeMethodVisitor = this
|
||||
|
@ -8,7 +8,7 @@ Complex and hypercomplex number systems in KMath:
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-complex:0.2.0-dev-6`.
|
||||
> This module artifact: `kscience.kmath:kmath-complex:0.2.0-dev-7`.
|
||||
>
|
||||
> Bintray release version: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-complex/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-complex/_latestVersion)
|
||||
>
|
||||
@ -26,7 +26,7 @@ Complex and hypercomplex number systems in KMath:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-complex:0.2.0-dev-6'
|
||||
> implementation 'kscience.kmath:kmath-complex:0.2.0-dev-7'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -40,6 +40,6 @@ Complex and hypercomplex number systems in KMath:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-complex:0.2.0-dev-6")
|
||||
> implementation("kscience.kmath:kmath-complex:0.2.0-dev-7")
|
||||
> }
|
||||
> ```
|
||||
|
@ -15,7 +15,7 @@ performance calculations to code generation.
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-core:0.2.0-dev-6`.
|
||||
> This module artifact: `kscience.kmath:kmath-core:0.2.0-dev-7`.
|
||||
>
|
||||
> 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)
|
||||
>
|
||||
@ -33,7 +33,7 @@ performance calculations to code generation.
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-core:0.2.0-dev-6'
|
||||
> implementation 'kscience.kmath:kmath-core:0.2.0-dev-7'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -47,6 +47,6 @@ performance calculations to code generation.
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-core:0.2.0-dev-6")
|
||||
> implementation("kscience.kmath:kmath-core:0.2.0-dev-7")
|
||||
> }
|
||||
> ```
|
||||
|
@ -9,7 +9,10 @@ import kscience.kmath.structures.BufferFactory
|
||||
import kscience.kmath.structures.asSequence
|
||||
|
||||
/**
|
||||
* Basic operations on matrices. Operates on [Matrix]
|
||||
* Basic operations on matrices. Operates on [Matrix].
|
||||
*
|
||||
* @param T the type of items in the matrices.
|
||||
* @param M the type of operated matrices.
|
||||
*/
|
||||
public interface MatrixContext<T : Any, out M : Matrix<T>> : SpaceOperations<Matrix<T>> {
|
||||
/**
|
||||
@ -83,9 +86,16 @@ public interface MatrixContext<T : Any, out M : Matrix<T>> : SpaceOperations<Mat
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Partial implementation of [MatrixContext] for matrices of [Ring].
|
||||
*
|
||||
* @param T the type of items in the matrices.
|
||||
* @param R the type of ring of matrix elements.
|
||||
* @param M the type of operated matrices.
|
||||
*/
|
||||
public interface GenericMatrixContext<T : Any, R : Ring<T>, out M : Matrix<T>> : MatrixContext<T, M> {
|
||||
/**
|
||||
* The ring context for matrix elements
|
||||
* The ring over matrix elements.
|
||||
*/
|
||||
public val elementContext: R
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
package kscience.kmath.linear
|
||||
|
||||
/**
|
||||
* The matrix where each element is evaluated each time when is being accessed.
|
||||
*
|
||||
* @property generator the function that provides elements.
|
||||
*/
|
||||
public class VirtualMatrix<T : Any>(
|
||||
override val rowNum: Int,
|
||||
override val colNum: Int,
|
||||
|
@ -86,3 +86,10 @@ public fun <T> NDStructure<T>.as2D(): Structure2D<T> = if (shape.size == 2)
|
||||
Structure2DWrapper(this)
|
||||
else
|
||||
error("Can't create 2d-structure from ${shape.size}d-structure")
|
||||
|
||||
/**
|
||||
* Alias for [Structure2D] with more familiar name.
|
||||
*
|
||||
* @param T the type of items in the matrix.
|
||||
*/
|
||||
public typealias Matrix<T> = Structure2D<T>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-for-real:0.2.0-dev-6`.
|
||||
> This module artifact: `kscience.kmath:kmath-for-real:0.2.0-dev-7`.
|
||||
>
|
||||
> 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-6'
|
||||
> implementation 'kscience.kmath:kmath-for-real:0.2.0-dev-7'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -39,6 +39,6 @@
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-for-real:0.2.0-dev-6")
|
||||
> implementation("kscience.kmath:kmath-for-real:0.2.0-dev-7")
|
||||
> }
|
||||
> ```
|
||||
|
@ -10,7 +10,7 @@ Functions and interpolations:
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-functions:0.2.0-dev-6`.
|
||||
> This module artifact: `kscience.kmath:kmath-functions:0.2.0-dev-7`.
|
||||
>
|
||||
> 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)
|
||||
>
|
||||
@ -28,7 +28,7 @@ Functions and interpolations:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation 'kscience.kmath:kmath-functions:0.2.0-dev-6'
|
||||
> implementation 'kscience.kmath:kmath-functions:0.2.0-dev-7'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -42,6 +42,6 @@ Functions and interpolations:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-functions:0.2.0-dev-6")
|
||||
> implementation("kscience.kmath:kmath-functions:0.2.0-dev-7")
|
||||
> }
|
||||
> ```
|
||||
|
@ -9,7 +9,7 @@ This subproject implements the following features:
|
||||
|
||||
> #### Artifact:
|
||||
>
|
||||
> This module artifact: `kscience.kmath:kmath-nd4j:0.2.0-dev-6`.
|
||||
> This module artifact: `kscience.kmath:kmath-nd4j:0.2.0-dev-7`.
|
||||
>
|
||||
> 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-6'
|
||||
> implementation 'kscience.kmath:kmath-nd4j:0.2.0-dev-7'
|
||||
> }
|
||||
> ```
|
||||
> **Gradle Kotlin DSL:**
|
||||
@ -41,7 +41,7 @@ This subproject implements the following features:
|
||||
> }
|
||||
>
|
||||
> dependencies {
|
||||
> implementation("kscience.kmath:kmath-nd4j:0.2.0-dev-6")
|
||||
> implementation("kscience.kmath:kmath-nd4j:0.2.0-dev-7")
|
||||
> }
|
||||
> ```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user