diff --git a/.gitignore b/.gitignore index bade7f08c..07589aa00 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,14 @@ build/ out/ .idea/ +.vscode/ # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) !gradle-wrapper.jar # Cache of project .gradletasknamecache + +# Generated by javac -h and runtime +*.class +*.log diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt index 201e39314..572f7089a 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/Algebra.kt @@ -175,6 +175,7 @@ public interface SpaceOperations : Algebra { * @param k the divisor. * @return the quotient. */ + @Deprecated("Dividing not allowed in a Ring") public operator fun T.div(k: Number): T = multiply(this, 1.0 / k.toDouble()) /** diff --git a/kmath-nd4j/src/main/kotlin/space/kscience/kmath/nd4j/Nd4jArrayAlgebra.kt b/kmath-nd4j/src/main/kotlin/space/kscience/kmath/nd4j/Nd4jArrayAlgebra.kt index 1e9818a4a..c50174b95 100644 --- a/kmath-nd4j/src/main/kotlin/space/kscience/kmath/nd4j/Nd4jArrayAlgebra.kt +++ b/kmath-nd4j/src/main/kotlin/space/kscience/kmath/nd4j/Nd4jArrayAlgebra.kt @@ -96,6 +96,7 @@ public interface Nd4jArraySpace> : NDSpace, Nd4jArrayAlgeb return a.ndArray.mul(k).wrap() } + @Deprecated("Avoid using this method, underlying array get casted to Doubles") public override operator fun NDStructure.div(k: Number): Nd4jArrayStructure { return ndArray.div(k).wrap() }