From 9e3fd240b82e9874517781a523620d5a862b19bb Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 8 Feb 2024 17:39:19 +0300 Subject: [PATCH] Update versions --- build.gradle.kts | 2 +- gradle.properties | 2 +- .../space/kscience/kmath/ejml/_generated.kt | 36 ++++++++++++++----- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f40cb88ee..a0befa3c5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ allprojects { } group = "space.kscience" - version = "0.4.0-dev-2" + version = "0.4.0-dev-3" } subprojects { diff --git a/gradle.properties b/gradle.properties index 5d62bf88e..0d373a8e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,6 +12,6 @@ org.gradle.jvmargs=-Xmx4096m org.gradle.parallel=true org.gradle.workers.max=4 -toolsVersion=0.15.0-kotlin-1.9.20 +toolsVersion=0.15.2-kotlin-1.9.22 #kotlin.experimental.tryK2=true #kscience.wasm.disabled=true \ No newline at end of file diff --git a/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt b/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt index 7a267b77b..c86d9bc44 100644 --- a/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt +++ b/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt @@ -19,19 +19,15 @@ import org.ejml.sparse.csc.factory.DecompositionFactory_DSCC import org.ejml.sparse.csc.factory.DecompositionFactory_FSCC import org.ejml.sparse.csc.factory.LinearSolverFactory_DSCC import org.ejml.sparse.csc.factory.LinearSolverFactory_FSCC +import space.kscience.attributes.SafeType +import space.kscience.attributes.safeTypeOf +import space.kscience.kmath.UnstableKMathAPI import space.kscience.kmath.linear.* import space.kscience.kmath.linear.Matrix -import space.kscience.kmath.UnstableKMathAPI import space.kscience.kmath.nd.StructureFeature -import space.kscience.kmath.structures.Float64 -import space.kscience.kmath.structures.Float32 -import space.kscience.kmath.operations.Float64Field import space.kscience.kmath.operations.Float32Field -import space.kscience.kmath.operations.DoubleField -import space.kscience.kmath.operations.FloatField +import space.kscience.kmath.operations.Float64Field import space.kscience.kmath.operations.invoke -import space.kscience.kmath.structures.Float64Buffer -import space.kscience.kmath.structures.Float32Buffer import space.kscience.kmath.structures.DoubleBuffer import space.kscience.kmath.structures.FloatBuffer import kotlin.reflect.KClass @@ -45,6 +41,8 @@ public class EjmlDoubleVector(override val origin: M) : EjmlVec require(origin.numRows == 1) { "The origin matrix must have only one row to form a vector" } } + override val type: SafeType get() = safeTypeOf() + override operator fun get(index: Int): Double = origin[0, index] } @@ -56,6 +54,8 @@ public class EjmlFloatVector(override val origin: M) : EjmlVect require(origin.numRows == 1) { "The origin matrix must have only one row to form a vector" } } + override val type: SafeType get() = safeTypeOf() + override operator fun get(index: Int): Float = origin[0, index] } @@ -63,6 +63,8 @@ public class EjmlFloatVector(override val origin: M) : EjmlVect * [EjmlMatrix] specialization for [Double]. */ public class EjmlDoubleMatrix(override val origin: M) : EjmlMatrix(origin) { + override val type: SafeType get() = safeTypeOf() + override operator fun get(i: Int, j: Int): Double = origin[i, j] } @@ -70,9 +72,13 @@ public class EjmlDoubleMatrix(override val origin: M) : EjmlMat * [EjmlMatrix] specialization for [Float]. */ public class EjmlFloatMatrix(override val origin: M) : EjmlMatrix(origin) { + override val type: SafeType get() = safeTypeOf() + override operator fun get(i: Int, j: Int): Float = origin[i, j] } + + /** * [EjmlLinearSpace] implementation based on [CommonOps_DDRM], [DecompositionFactory_DDRM] operations and * [DMatrixRMaj] matrices. @@ -83,6 +89,8 @@ public object EjmlLinearSpaceDDRM : EjmlLinearSpace get() = safeTypeOf() + @Suppress("UNCHECKED_CAST") override fun Matrix.toEjml(): EjmlDoubleMatrix = when { this is EjmlDoubleMatrix<*> && origin is DMatrixRMaj -> this as EjmlDoubleMatrix @@ -309,6 +317,8 @@ public object EjmlLinearSpaceDDRM : EjmlLinearSpace get() = safeTypeOf() + @Suppress("UNCHECKED_CAST") override fun Matrix.toEjml(): EjmlFloatMatrix = when { this is EjmlFloatMatrix<*> && origin is FMatrixRMaj -> this as EjmlFloatMatrix @@ -545,6 +557,8 @@ public object EjmlLinearSpaceFDRM : EjmlLinearSpace get() = safeTypeOf() + @Suppress("UNCHECKED_CAST") override fun Matrix.toEjml(): EjmlDoubleMatrix = when { this is EjmlDoubleMatrix<*> && origin is DMatrixSparseCSC -> this as EjmlDoubleMatrix @@ -776,6 +792,8 @@ public object EjmlLinearSpaceDSCC : EjmlLinearSpace get() = safeTypeOf() + @Suppress("UNCHECKED_CAST") override fun Matrix.toEjml(): EjmlFloatMatrix = when { this is EjmlFloatMatrix<*> && origin is FMatrixSparseCSC -> this as EjmlFloatMatrix