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() } diff --git a/kmath-torch/src/cppMain/.vscode/c_cpp_properties.json b/kmath-torch/src/cppMain/.vscode/c_cpp_properties.json new file mode 100644 index 000000000..711f47bff --- /dev/null +++ b/kmath-torch/src/cppMain/.vscode/c_cpp_properties.json @@ -0,0 +1,21 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "${env:HOME}/miniconda3/envs/ghmc/include", + "${env:HOME}/miniconda3/envs/ghmc/include/python3.8", + "${env:HOME}/miniconda3/envs/ghmc/include/torch/csrc/api/include", + "${env:HOME}/.jdks/openjdk-15.0.2/include", + "${env:HOME}/.jdks/openjdk-15.0.2/include/linux" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "gnu11", + "cppStandard": "gnu++17", + "intelliSenseMode": "gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/kmath-torch/src/cppMain/.vscode/settings.json b/kmath-torch/src/cppMain/.vscode/settings.json new file mode 100644 index 000000000..fd26c7488 --- /dev/null +++ b/kmath-torch/src/cppMain/.vscode/settings.json @@ -0,0 +1,71 @@ +{ + "python.linting.pylintEnabled": false, + "python.linting.mypyEnabled": true, + "python.linting.enabled": false, + "files.associations": { + "chrono": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "array": "cpp", + "atomic": "cpp", + "*.tcc": "cpp", + "cinttypes": "cpp", + "complex": "cpp", + "condition_variable": "cpp", + "cstdint": "cpp", + "deque": "cpp", + "forward_list": "cpp", + "list": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "map": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "ratio": "cpp", + "set": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "typeindex": "cpp", + "typeinfo": "cpp", + "valarray": "cpp", + "variant": "cpp", + "future": "cpp", + "bit": "cpp" + }, + "python.pythonPath": "${env:HOME}/miniconda3/envs/ghmc/bin/python" +} \ No newline at end of file diff --git a/kmath-torch/src/jvmMain/java/kscience/kmath/torch/JTorch.class b/kmath-torch/src/jvmMain/java/kscience/kmath/torch/JTorch.class new file mode 100644 index 000000000..d3ce6fcc9 Binary files /dev/null and b/kmath-torch/src/jvmMain/java/kscience/kmath/torch/JTorch.class differ