diff --git a/README.md b/README.md index 08d1e988a..c2e67e815 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Gradle build](https://github.com/mipt-npm/kmath/workflows/Gradle%20build/badge.svg) -Bintray: [ ![Download](https://api.bintray.com/packages/mipt-npm/scientifik/kmath-core/images/download.svg) ](https://bintray.com/mipt-npm/scientifik/kmath-core/_latestVersion) +Bintray: [ ![Download](https://api.bintray.com/packages/mipt-npm/kscience/kmath-core/images/download.svg) ](https://bintray.com/mipt-npm/kscience/kmath-core/_latestVersion) Bintray-dev: [ ![Download](https://api.bintray.com/packages/mipt-npm/dev/kmath-core/images/download.svg) ](https://bintray.com/mipt-npm/dev/kmath-core/_latestVersion) @@ -80,12 +80,12 @@ Release artifacts are accessible from bintray with following configuration (see ```kotlin repositories{ - maven("https://dl.bintray.com/mipt-npm/scientifik") + maven("https://dl.bintray.com/mipt-npm/kscience") } dependencies{ - api("scientifik:kmath-core:${kmathVersion}") - //api("scientifik:kmath-core-jvm:${kmathVersion}") for jvm-specific version + api("kscience.kmath:kmath-core:${kmathVersion}") + //api("kscience.kmath:kmath-core-jvm:${kmathVersion}") for jvm-specific version } ``` diff --git a/doc/algebra.md b/doc/algebra.md index b1b77a31f..c3227517f 100644 --- a/doc/algebra.md +++ b/doc/algebra.md @@ -5,7 +5,7 @@ operation, say `+`, one needs two objects of a type `T` and an algebra context, say `Space`. Next one needs to run the actual operation in the context: ```kotlin -import scientifik.kmath.operations.* +import kscience.kmath.operations.* val a: T = ... val b: T = ... @@ -47,7 +47,7 @@ but it also holds reference to the `ComplexField` singleton, which allows perfor numbers without explicit involving the context like: ```kotlin -import scientifik.kmath.operations.* +import kscience.kmath.operations.* // Using elements val c1 = Complex(1.0, 1.0) @@ -82,7 +82,7 @@ operations in all performance-critical places. The performance of element operat KMath submits both contexts and elements for builtin algebraic structures: ```kotlin -import scientifik.kmath.operations.* +import kscience.kmath.operations.* val c1 = Complex(1.0, 2.0) val c2 = ComplexField.i @@ -95,7 +95,7 @@ val c3 = ComplexField { c1 + c2 } Also, `ComplexField` features special operations to mix complex and real numbers, for example: ```kotlin -import scientifik.kmath.operations.* +import kscience.kmath.operations.* val c1 = Complex(1.0, 2.0) val c2 = ComplexField { c1 - 1.0 } // Returns: Complex(re=0.0, im=2.0) diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 40da41d2b..3d193efce 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -10,7 +10,7 @@ plugins { allOpen.annotation("org.openjdk.jmh.annotations.State") repositories { - maven("https://dl.bintray.com/mipt-npm/scientifik") + maven("https://dl.bintray.com/mipt-npm/kscience") maven("https://dl.bintray.com/mipt-npm/dev") maven("https://dl.bintray.com/kotlin/kotlin-dev/") mavenCentral() diff --git a/examples/src/benchmarks/kotlin/kscience/kmath/structures/ArrayBenchmark.kt b/examples/src/benchmarks/kotlin/kscience/kmath/structures/ArrayBenchmark.kt new file mode 100644 index 000000000..2673552f5 --- /dev/null +++ b/examples/src/benchmarks/kotlin/kscience/kmath/structures/ArrayBenchmark.kt @@ -0,0 +1,39 @@ +package kscience.kmath.structures + +import org.openjdk.jmh.annotations.Benchmark +import org.openjdk.jmh.annotations.Scope +import org.openjdk.jmh.annotations.State +import java.nio.IntBuffer + +@State(Scope.Benchmark) +class ArrayBenchmark { + @Benchmark + fun benchmarkArrayRead() { + var res = 0 + for (i in 1.._root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size) res += _root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.array[_root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size - i] + } + + @Benchmark + fun benchmarkBufferRead() { + var res = 0 + for (i in 1.._root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size) res += _root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.arrayBuffer.get( + _root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size - i) + } + + @Benchmark + fun nativeBufferRead() { + var res = 0 + for (i in 1.._root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size) res += _root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.nativeBuffer.get( + _root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size - i) + } + + companion object { + const val size: Int = 1000 + val array: IntArray = IntArray(_root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size) { it } + val arrayBuffer: IntBuffer = IntBuffer.wrap(_root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.array) + + val nativeBuffer: IntBuffer = IntBuffer.allocate(_root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size).also { + for (i in 0 until _root_ide_package_.kscience.kmath.structures.ArrayBenchmark.Companion.size) it.put(i, i) + } + } +} diff --git a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/BufferBenchmark.kt b/examples/src/benchmarks/kotlin/kscience/kmath/structures/BufferBenchmark.kt similarity index 83% rename from examples/src/benchmarks/kotlin/scientifik/kmath/structures/BufferBenchmark.kt rename to examples/src/benchmarks/kotlin/kscience/kmath/structures/BufferBenchmark.kt index e40b0c4b7..009d51001 100644 --- a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/BufferBenchmark.kt +++ b/examples/src/benchmarks/kotlin/kscience/kmath/structures/BufferBenchmark.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.structures +package kscience.kmath.structures +import kscience.kmath.operations.Complex +import kscience.kmath.operations.complex import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Scope import org.openjdk.jmh.annotations.State -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.complex @State(Scope.Benchmark) class BufferBenchmark { diff --git a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/NDFieldBenchmark.kt b/examples/src/benchmarks/kotlin/kscience/kmath/structures/NDFieldBenchmark.kt similarity index 89% rename from examples/src/benchmarks/kotlin/scientifik/kmath/structures/NDFieldBenchmark.kt rename to examples/src/benchmarks/kotlin/kscience/kmath/structures/NDFieldBenchmark.kt index 46da6c6d8..64f279c39 100644 --- a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/NDFieldBenchmark.kt +++ b/examples/src/benchmarks/kotlin/kscience/kmath/structures/NDFieldBenchmark.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.structures +package kscience.kmath.structures +import kscience.kmath.operations.RealField +import kscience.kmath.operations.invoke import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Scope import org.openjdk.jmh.annotations.State -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.invoke @State(Scope.Benchmark) class NDFieldBenchmark { diff --git a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/ViktorBenchmark.kt b/examples/src/benchmarks/kotlin/kscience/kmath/structures/ViktorBenchmark.kt similarity index 89% rename from examples/src/benchmarks/kotlin/scientifik/kmath/structures/ViktorBenchmark.kt rename to examples/src/benchmarks/kotlin/kscience/kmath/structures/ViktorBenchmark.kt index 9627743c9..a4b831f7c 100644 --- a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/ViktorBenchmark.kt +++ b/examples/src/benchmarks/kotlin/kscience/kmath/structures/ViktorBenchmark.kt @@ -1,12 +1,12 @@ -package scientifik.kmath.structures +package kscience.kmath.structures +import kscience.kmath.operations.RealField +import kscience.kmath.operations.invoke +import kscience.kmath.viktor.ViktorNDField import org.jetbrains.bio.viktor.F64Array import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.Scope import org.openjdk.jmh.annotations.State -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.invoke -import scientifik.kmath.viktor.ViktorNDField @State(Scope.Benchmark) class ViktorBenchmark { diff --git a/examples/src/benchmarks/kotlin/scientifik/kmath/utils/utils.kt b/examples/src/benchmarks/kotlin/kscience/kmath/utils/utils.kt similarity index 91% rename from examples/src/benchmarks/kotlin/scientifik/kmath/utils/utils.kt rename to examples/src/benchmarks/kotlin/kscience/kmath/utils/utils.kt index 3b0d56291..329b7b17b 100644 --- a/examples/src/benchmarks/kotlin/scientifik/kmath/utils/utils.kt +++ b/examples/src/benchmarks/kotlin/kscience/kmath/utils/utils.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.utils +package kscience.kmath.utils import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/ArrayBenchmark.kt b/examples/src/benchmarks/kotlin/scientifik/kmath/structures/ArrayBenchmark.kt deleted file mode 100644 index 2ccb27871..000000000 --- a/examples/src/benchmarks/kotlin/scientifik/kmath/structures/ArrayBenchmark.kt +++ /dev/null @@ -1,37 +0,0 @@ -package scientifik.kmath.structures - -import org.openjdk.jmh.annotations.Benchmark -import org.openjdk.jmh.annotations.Scope -import org.openjdk.jmh.annotations.State -import java.nio.IntBuffer - -@State(Scope.Benchmark) -class ArrayBenchmark { - @Benchmark - fun benchmarkArrayRead() { - var res = 0 - for (i in 1..size) res += array[size - i] - } - - @Benchmark - fun benchmarkBufferRead() { - var res = 0 - for (i in 1..size) res += arrayBuffer.get(size - i) - } - - @Benchmark - fun nativeBufferRead() { - var res = 0 - for (i in 1..size) res += nativeBuffer.get(size - i) - } - - companion object { - const val size: Int = 1000 - val array: IntArray = IntArray(size) { it } - val arrayBuffer: IntBuffer = IntBuffer.wrap(array) - - val nativeBuffer: IntBuffer = IntBuffer.allocate(size).also { - for (i in 0 until size) it.put(i, i) - } - } -} diff --git a/examples/src/main/kotlin/scientifik/kmath/ast/ExpressionsInterpretersBenchmark.kt b/examples/src/main/kotlin/kscience/kmath/ast/ExpressionsInterpretersBenchmark.kt similarity index 82% rename from examples/src/main/kotlin/scientifik/kmath/ast/ExpressionsInterpretersBenchmark.kt rename to examples/src/main/kotlin/kscience/kmath/ast/ExpressionsInterpretersBenchmark.kt index 80e70d149..a5768f1f5 100644 --- a/examples/src/main/kotlin/scientifik/kmath/ast/ExpressionsInterpretersBenchmark.kt +++ b/examples/src/main/kotlin/kscience/kmath/ast/ExpressionsInterpretersBenchmark.kt @@ -1,11 +1,11 @@ -//package scientifik.kmath.ast +//package kscience.kmath.ast // -//import scientifik.kmath.asm.compile -//import scientifik.kmath.expressions.Expression -//import scientifik.kmath.expressions.expressionInField -//import scientifik.kmath.expressions.invoke -//import scientifik.kmath.operations.Field -//import scientifik.kmath.operations.RealField +//import kscience.kmath.asm.compile +//import kscience.kmath.expressions.Expression +//import kscience.kmath.expressions.expressionInField +//import kscience.kmath.expressions.invoke +//import kscience.kmath.operations.Field +//import kscience.kmath.operations.RealField //import kotlin.random.Random //import kotlin.system.measureTimeMillis // diff --git a/examples/src/main/kotlin/scientifik/kmath/commons/prob/DistributionBenchmark.kt b/examples/src/main/kotlin/kscience/kmath/commons/prob/DistributionBenchmark.kt similarity index 94% rename from examples/src/main/kotlin/scientifik/kmath/commons/prob/DistributionBenchmark.kt rename to examples/src/main/kotlin/kscience/kmath/commons/prob/DistributionBenchmark.kt index b060cddb6..57a9c55c5 100644 --- a/examples/src/main/kotlin/scientifik/kmath/commons/prob/DistributionBenchmark.kt +++ b/examples/src/main/kotlin/kscience/kmath/commons/prob/DistributionBenchmark.kt @@ -1,12 +1,12 @@ -package scientifik.kmath.commons.prob +package kscience.kmath.commons.prob import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async import kotlinx.coroutines.runBlocking +import kscience.kmath.chains.BlockingRealChain +import kscience.kmath.prob.* import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler import org.apache.commons.rng.simple.RandomSource -import scientifik.kmath.chains.BlockingRealChain -import scientifik.kmath.prob.* import java.time.Duration import java.time.Instant diff --git a/examples/src/main/kotlin/scientifik/kmath/commons/prob/DistributionDemo.kt b/examples/src/main/kotlin/kscience/kmath/commons/prob/DistributionDemo.kt similarity index 72% rename from examples/src/main/kotlin/scientifik/kmath/commons/prob/DistributionDemo.kt rename to examples/src/main/kotlin/kscience/kmath/commons/prob/DistributionDemo.kt index e059415dc..dbb51267b 100644 --- a/examples/src/main/kotlin/scientifik/kmath/commons/prob/DistributionDemo.kt +++ b/examples/src/main/kotlin/kscience/kmath/commons/prob/DistributionDemo.kt @@ -1,11 +1,11 @@ -package scientifik.kmath.commons.prob +package kscience.kmath.commons.prob import kotlinx.coroutines.runBlocking -import scientifik.kmath.chains.Chain -import scientifik.kmath.chains.collectWithState -import scientifik.kmath.prob.Distribution -import scientifik.kmath.prob.RandomGenerator -import scientifik.kmath.prob.normal +import kscience.kmath.chains.Chain +import kscience.kmath.chains.collectWithState +import kscience.kmath.prob.Distribution +import kscience.kmath.prob.RandomGenerator +import kscience.kmath.prob.normal data class AveragingChainState(var num: Int = 0, var value: Double = 0.0) diff --git a/examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt b/examples/src/main/kotlin/kscience/kmath/operations/BigIntDemo.kt similarity index 72% rename from examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt rename to examples/src/main/kotlin/kscience/kmath/operations/BigIntDemo.kt index 10b038943..692ea6d8c 100644 --- a/examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt +++ b/examples/src/main/kotlin/kscience/kmath/operations/BigIntDemo.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations fun main() { val res = BigIntField { diff --git a/examples/src/main/kotlin/scientifik/kmath/operations/ComplexDemo.kt b/examples/src/main/kotlin/kscience/kmath/operations/ComplexDemo.kt similarity index 68% rename from examples/src/main/kotlin/scientifik/kmath/operations/ComplexDemo.kt rename to examples/src/main/kotlin/kscience/kmath/operations/ComplexDemo.kt index 6dbfebce1..3c97940a8 100644 --- a/examples/src/main/kotlin/scientifik/kmath/operations/ComplexDemo.kt +++ b/examples/src/main/kotlin/kscience/kmath/operations/ComplexDemo.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.operations +package kscience.kmath.operations -import scientifik.kmath.structures.NDElement -import scientifik.kmath.structures.NDField -import scientifik.kmath.structures.complex +import kscience.kmath.structures.NDElement +import kscience.kmath.structures.NDField +import kscience.kmath.structures.complex fun main() { val element = NDElement.complex(2, 2) { index: IntArray -> diff --git a/examples/src/main/kotlin/scientifik/kmath/structures/ComplexND.kt b/examples/src/main/kotlin/kscience/kmath/structures/ComplexND.kt similarity index 85% rename from examples/src/main/kotlin/scientifik/kmath/structures/ComplexND.kt rename to examples/src/main/kotlin/kscience/kmath/structures/ComplexND.kt index 2329f3fc3..aa4b10ef2 100644 --- a/examples/src/main/kotlin/scientifik/kmath/structures/ComplexND.kt +++ b/examples/src/main/kotlin/kscience/kmath/structures/ComplexND.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.linear.transpose -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.ComplexField -import scientifik.kmath.operations.invoke +import kscience.kmath.linear.transpose +import kscience.kmath.operations.Complex +import kscience.kmath.operations.ComplexField +import kscience.kmath.operations.invoke import kotlin.system.measureTimeMillis fun main() { diff --git a/examples/src/main/kotlin/scientifik/kmath/structures/NDField.kt b/examples/src/main/kotlin/kscience/kmath/structures/NDField.kt similarity index 93% rename from examples/src/main/kotlin/scientifik/kmath/structures/NDField.kt rename to examples/src/main/kotlin/kscience/kmath/structures/NDField.kt index 54ffcb67c..28bfab779 100644 --- a/examples/src/main/kotlin/scientifik/kmath/structures/NDField.kt +++ b/examples/src/main/kotlin/kscience/kmath/structures/NDField.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.structures +package kscience.kmath.structures import kotlinx.coroutines.GlobalScope -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.RealField +import kscience.kmath.operations.invoke import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.system.measureTimeMillis diff --git a/examples/src/main/kotlin/scientifik/kmath/structures/StructureReadBenchmark.kt b/examples/src/main/kotlin/kscience/kmath/structures/StructureReadBenchmark.kt similarity index 96% rename from examples/src/main/kotlin/scientifik/kmath/structures/StructureReadBenchmark.kt rename to examples/src/main/kotlin/kscience/kmath/structures/StructureReadBenchmark.kt index d5998cd0a..a2bfea2f9 100644 --- a/examples/src/main/kotlin/scientifik/kmath/structures/StructureReadBenchmark.kt +++ b/examples/src/main/kotlin/kscience/kmath/structures/StructureReadBenchmark.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.structures +package kscience.kmath.structures import kotlin.system.measureTimeMillis diff --git a/examples/src/main/kotlin/scientifik/kmath/structures/StructureWriteBenchmark.kt b/examples/src/main/kotlin/kscience/kmath/structures/StructureWriteBenchmark.kt similarity index 96% rename from examples/src/main/kotlin/scientifik/kmath/structures/StructureWriteBenchmark.kt rename to examples/src/main/kotlin/kscience/kmath/structures/StructureWriteBenchmark.kt index ffcecbce2..b2975393f 100644 --- a/examples/src/main/kotlin/scientifik/kmath/structures/StructureWriteBenchmark.kt +++ b/examples/src/main/kotlin/kscience/kmath/structures/StructureWriteBenchmark.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.structures +package kscience.kmath.structures import kotlin.system.measureTimeMillis diff --git a/examples/src/main/kotlin/scientifik/kmath/structures/typeSafeDimensions.kt b/examples/src/main/kotlin/kscience/kmath/structures/typeSafeDimensions.kt similarity index 71% rename from examples/src/main/kotlin/scientifik/kmath/structures/typeSafeDimensions.kt rename to examples/src/main/kotlin/kscience/kmath/structures/typeSafeDimensions.kt index 5d323823a..bf83a9f05 100644 --- a/examples/src/main/kotlin/scientifik/kmath/structures/typeSafeDimensions.kt +++ b/examples/src/main/kotlin/kscience/kmath/structures/typeSafeDimensions.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.dimensions.D2 -import scientifik.kmath.dimensions.D3 -import scientifik.kmath.dimensions.DMatrixContext -import scientifik.kmath.dimensions.Dimension -import scientifik.kmath.operations.RealField +import kscience.kmath.dimensions.D2 +import kscience.kmath.dimensions.D3 +import kscience.kmath.dimensions.DMatrixContext +import kscience.kmath.dimensions.Dimension +import kscience.kmath.operations.RealField fun DMatrixContext.simple() { val m1 = produce { i, j -> (i + j).toDouble() } diff --git a/kmath-ast/README.md b/kmath-ast/README.md index 2339d0426..043224800 100644 --- a/kmath-ast/README.md +++ b/kmath-ast/README.md @@ -8,32 +8,32 @@ This subproject implements the following features: - Evaluating expressions by traversing MST. > #### Artifact: -> This module is distributed in the artifact `scientifik:kmath-ast:0.1.4-dev-8`. +> This module is distributed in the artifact `kscience.kmath:kmath-ast:0.1.4-dev-8`. > > **Gradle:** > > ```gradle > repositories { -> maven { url 'https://dl.bintray.com/mipt-npm/scientifik' } +> maven { url 'https://dl.bintray.com/mipt-npm/kscience' } > maven { url 'https://dl.bintray.com/mipt-npm/dev' } > maven { url https://dl.bintray.com/hotkeytlt/maven' } > } > > dependencies { -> implementation 'scientifik:kmath-ast:0.1.4-dev-8' +> implementation 'kscience.kmath:kmath-ast:0.1.4-dev-8' > } > ``` > **Gradle Kotlin DSL:** > > ```kotlin > repositories { -> maven("https://dl.bintray.com/mipt-npm/scientifik") +> maven("https://dl.bintray.com/mipt-npm/kscience") > maven("https://dl.bintray.com/mipt-npm/dev") > maven("https://dl.bintray.com/hotkeytlt/maven") > } > > dependencies { -> implementation("scientifik:kmath-ast:0.1.4-dev-8") +> implementation("kscience.kmath:kmath-ast:0.1.4-dev-8") > } > ``` > @@ -52,12 +52,12 @@ RealField.mstInField { symbol("x") + 2 }.compile() … leads to generation of bytecode, which can be decompiled to the following Java class: ```java -package scientifik.kmath.asm.generated; +package kscience.kmath.asm.generated; import java.util.Map; -import scientifik.kmath.asm.internal.MapIntrinsics; -import scientifik.kmath.expressions.Expression; -import scientifik.kmath.operations.RealField; +import kscience.kmath.asm.internal.MapIntrinsics; +import kscience.kmath.expressions.Expression; +import kscience.kmath.operations.RealField; public final class AsmCompiledExpression_1073786867_0 implements Expression { private final RealField algebra; diff --git a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MST.kt b/kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MST.kt similarity index 94% rename from kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MST.kt rename to kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MST.kt index 283a20649..f312323b9 100644 --- a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MST.kt +++ b/kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MST.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.ast +package kscience.kmath.ast -import scientifik.kmath.operations.Algebra -import scientifik.kmath.operations.NumericAlgebra -import scientifik.kmath.operations.RealField +import kscience.kmath.operations.Algebra +import kscience.kmath.operations.NumericAlgebra +import kscience.kmath.operations.RealField /** * A Mathematical Syntax Tree node for mathematical expressions. diff --git a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MstAlgebra.kt b/kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MstAlgebra.kt similarity index 98% rename from kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MstAlgebra.kt rename to kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MstAlgebra.kt index 8cee0ea0b..64a820b20 100644 --- a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MstAlgebra.kt +++ b/kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MstAlgebra.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.ast +package kscience.kmath.ast -import scientifik.kmath.operations.* +import kscience.kmath.operations.* /** * [Algebra] over [MST] nodes. diff --git a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MstExpression.kt b/kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MstExpression.kt similarity index 97% rename from kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MstExpression.kt rename to kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MstExpression.kt index d094e2fee..483bc530c 100644 --- a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MstExpression.kt +++ b/kmath-ast/src/commonMain/kotlin/kscience/kmath/ast/MstExpression.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.ast +package kscience.kmath.ast -import scientifik.kmath.expressions.* -import scientifik.kmath.operations.* +import kscience.kmath.expressions.* +import kscience.kmath.operations.* import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/asm.kt b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/asm.kt similarity index 83% rename from kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/asm.kt rename to kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/asm.kt index 3ca817b63..edfe7f01d 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/asm.kt +++ b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/asm.kt @@ -1,13 +1,13 @@ -package scientifik.kmath.asm +package kscience.kmath.asm -import scientifik.kmath.asm.internal.AsmBuilder -import scientifik.kmath.asm.internal.MstType -import scientifik.kmath.asm.internal.buildAlgebraOperationCall -import scientifik.kmath.asm.internal.buildName -import scientifik.kmath.ast.MST -import scientifik.kmath.ast.MstExpression -import scientifik.kmath.expressions.Expression -import scientifik.kmath.operations.Algebra +import kscience.kmath.asm.internal.AsmBuilder +import kscience.kmath.asm.internal.MstType +import kscience.kmath.asm.internal.buildAlgebraOperationCall +import kscience.kmath.asm.internal.buildName +import kscience.kmath.ast.MST +import kscience.kmath.ast.MstExpression +import kscience.kmath.expressions.Expression +import kscience.kmath.operations.Algebra import kotlin.reflect.KClass /** diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/AsmBuilder.kt b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/AsmBuilder.kt similarity index 98% rename from kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/AsmBuilder.kt rename to kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/AsmBuilder.kt index 1cf49a251..ab2de97aa 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/AsmBuilder.kt +++ b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/AsmBuilder.kt @@ -1,13 +1,13 @@ -package scientifik.kmath.asm.internal +package kscience.kmath.asm.internal +import kscience.kmath.asm.internal.AsmBuilder.ClassLoader +import kscience.kmath.ast.MST +import kscience.kmath.expressions.Expression +import kscience.kmath.operations.Algebra +import kscience.kmath.operations.NumericAlgebra import org.objectweb.asm.* import org.objectweb.asm.Opcodes.* import org.objectweb.asm.commons.InstructionAdapter -import scientifik.kmath.asm.internal.AsmBuilder.ClassLoader -import scientifik.kmath.ast.MST -import scientifik.kmath.expressions.Expression -import scientifik.kmath.operations.Algebra -import scientifik.kmath.operations.NumericAlgebra import java.util.* import java.util.stream.Collectors import kotlin.reflect.KClass @@ -564,6 +564,6 @@ internal class AsmBuilder internal constructor( /** * ASM type for MapIntrinsics. */ - internal val MAP_INTRINSICS_TYPE: Type by lazy { Type.getObjectType("scientifik/kmath/asm/internal/MapIntrinsics") } + internal val MAP_INTRINSICS_TYPE: Type by lazy { Type.getObjectType("kscience/kmath/asm/internal/MapIntrinsics") } } } diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/MstType.kt b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/MstType.kt similarity index 81% rename from kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/MstType.kt rename to kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/MstType.kt index 81e6791c1..526c27305 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/MstType.kt +++ b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/MstType.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.asm.internal +package kscience.kmath.asm.internal -import scientifik.kmath.ast.MST +import kscience.kmath.ast.MST /** * Represents types known in [MST], numbers and general values. diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/codegenUtils.kt b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/codegenUtils.kt similarity index 94% rename from kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/codegenUtils.kt rename to kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/codegenUtils.kt index ab29d3614..67fce40ac 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/codegenUtils.kt +++ b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/codegenUtils.kt @@ -1,14 +1,14 @@ -package scientifik.kmath.asm.internal +package kscience.kmath.asm.internal +import kscience.kmath.ast.MST +import kscience.kmath.expressions.Expression +import kscience.kmath.operations.Algebra +import kscience.kmath.operations.FieldOperations +import kscience.kmath.operations.RingOperations +import kscience.kmath.operations.SpaceOperations import org.objectweb.asm.* import org.objectweb.asm.Opcodes.INVOKEVIRTUAL import org.objectweb.asm.commons.InstructionAdapter -import scientifik.kmath.ast.MST -import scientifik.kmath.expressions.Expression -import scientifik.kmath.operations.Algebra -import scientifik.kmath.operations.FieldOperations -import scientifik.kmath.operations.RingOperations -import scientifik.kmath.operations.SpaceOperations import java.lang.reflect.Method import kotlin.contracts.InvocationKind import kotlin.contracts.contract @@ -76,7 +76,7 @@ internal fun MethodVisitor.label(): Label = Label().also { visitLabel(it) } * @author Iaroslav Postovalov */ internal tailrec fun buildName(mst: MST, collision: Int = 0): String { - val name = "scientifik.kmath.asm.generated.AsmCompiledExpression_${mst.hashCode()}_$collision" + val name = "kscience.kmath.asm.generated.AsmCompiledExpression_${mst.hashCode()}_$collision" try { Class.forName(name) diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/mapIntrinsics.kt b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/mapIntrinsics.kt similarity index 89% rename from kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/mapIntrinsics.kt rename to kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/mapIntrinsics.kt index 997dbbfe5..708b3c2b4 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/asm/internal/mapIntrinsics.kt +++ b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/asm/internal/mapIntrinsics.kt @@ -1,6 +1,6 @@ @file:JvmName("MapIntrinsics") -package scientifik.kmath.asm.internal +package kscience.kmath.asm.internal /** * Gets value with given [key] or throws [IllegalStateException] whenever it is not present. diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/ast/parser.kt similarity index 93% rename from kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt rename to kmath-ast/src/jvmMain/kotlin/kscience/kmath/ast/parser.kt index 8ccbf4606..15e6625db 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt +++ b/kmath-ast/src/jvmMain/kotlin/kscience/kmath/ast/parser.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.ast +package kscience.kmath.ast import com.github.h0tk3y.betterParse.combinators.* import com.github.h0tk3y.betterParse.grammar.Grammar @@ -10,10 +10,10 @@ import com.github.h0tk3y.betterParse.lexer.TokenMatch import com.github.h0tk3y.betterParse.lexer.regexToken import com.github.h0tk3y.betterParse.parser.ParseResult import com.github.h0tk3y.betterParse.parser.Parser -import scientifik.kmath.operations.FieldOperations -import scientifik.kmath.operations.PowerOperations -import scientifik.kmath.operations.RingOperations -import scientifik.kmath.operations.SpaceOperations +import kscience.kmath.operations.FieldOperations +import kscience.kmath.operations.PowerOperations +import kscience.kmath.operations.RingOperations +import kscience.kmath.operations.SpaceOperations /** * TODO move to common after IR version is released diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmAlgebras.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmAlgebras.kt index 3acc6eb28..5d8f90c9b 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmAlgebras.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmAlgebras.kt @@ -1,12 +1,12 @@ package scietifik.kmath.asm -import scientifik.kmath.asm.compile -import scientifik.kmath.ast.mstInField -import scientifik.kmath.ast.mstInRing -import scientifik.kmath.ast.mstInSpace -import scientifik.kmath.expressions.invoke -import scientifik.kmath.operations.ByteRing -import scientifik.kmath.operations.RealField +import kscience.kmath.asm.compile +import kscience.kmath.ast.mstInField +import kscience.kmath.ast.mstInRing +import kscience.kmath.ast.mstInSpace +import kscience.kmath.expressions.invoke +import kscience.kmath.operations.ByteRing +import kscience.kmath.operations.RealField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmExpressions.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmExpressions.kt index 36c254c38..c2e45b8ff 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmExpressions.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmExpressions.kt @@ -1,10 +1,10 @@ package scietifik.kmath.asm -import scientifik.kmath.asm.compile -import scientifik.kmath.ast.mstInField -import scientifik.kmath.ast.mstInSpace -import scientifik.kmath.expressions.invoke -import scientifik.kmath.operations.RealField +import kscience.kmath.asm.compile +import kscience.kmath.ast.mstInField +import kscience.kmath.ast.mstInSpace +import kscience.kmath.expressions.invoke +import kscience.kmath.operations.RealField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmSpecialization.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmSpecialization.kt index a88431e9d..2b27fdc0f 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmSpecialization.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmSpecialization.kt @@ -1,9 +1,9 @@ package scietifik.kmath.asm -import scientifik.kmath.asm.compile -import scientifik.kmath.ast.mstInField -import scientifik.kmath.expressions.invoke -import scientifik.kmath.operations.RealField +import kscience.kmath.asm.compile +import kscience.kmath.ast.mstInField +import kscience.kmath.expressions.invoke +import kscience.kmath.operations.RealField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmVariables.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmVariables.kt index aafc75448..3511be97c 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmVariables.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/asm/TestAsmVariables.kt @@ -1,8 +1,8 @@ package scietifik.kmath.asm -import scientifik.kmath.ast.mstInRing -import scientifik.kmath.expressions.invoke -import scientifik.kmath.operations.ByteRing +import kscience.kmath.ast.mstInRing +import kscience.kmath.expressions.invoke +import kscience.kmath.operations.ByteRing import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/AsmTest.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/AsmTest.kt index 75659cc35..bb371bed0 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/AsmTest.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/AsmTest.kt @@ -1,12 +1,12 @@ package scietifik.kmath.ast -import scientifik.kmath.asm.compile -import scientifik.kmath.asm.expression -import scientifik.kmath.ast.mstInField -import scientifik.kmath.ast.parseMath -import scientifik.kmath.expressions.invoke -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.ComplexField +import kscience.kmath.asm.compile +import kscience.kmath.asm.expression +import kscience.kmath.ast.mstInField +import kscience.kmath.ast.parseMath +import kscience.kmath.expressions.invoke +import kscience.kmath.operations.Complex +import kscience.kmath.operations.ComplexField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserPrecedenceTest.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserPrecedenceTest.kt index 9bdbb12c9..21ee47d13 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserPrecedenceTest.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserPrecedenceTest.kt @@ -1,9 +1,9 @@ package scietifik.kmath.ast -import scientifik.kmath.ast.evaluate -import scientifik.kmath.ast.parseMath -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.RealField +import kscience.kmath.ast.evaluate +import kscience.kmath.ast.parseMath +import kscience.kmath.operations.Field +import kscience.kmath.operations.RealField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserTest.kt b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserTest.kt index 9179c3428..8a5d6ba48 100644 --- a/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserTest.kt +++ b/kmath-ast/src/jvmTest/kotlin/scietifik/kmath/ast/ParserTest.kt @@ -1,13 +1,13 @@ package scietifik.kmath.ast -import scientifik.kmath.ast.evaluate -import scientifik.kmath.ast.mstInField -import scientifik.kmath.ast.parseMath -import scientifik.kmath.expressions.invoke -import scientifik.kmath.operations.Algebra -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.ComplexField -import scientifik.kmath.operations.RealField +import kscience.kmath.ast.evaluate +import kscience.kmath.ast.mstInField +import kscience.kmath.ast.parseMath +import kscience.kmath.expressions.invoke +import kscience.kmath.operations.Algebra +import kscience.kmath.operations.Complex +import kscience.kmath.operations.ComplexField +import kscience.kmath.operations.RealField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/expressions/DiffExpression.kt b/kmath-commons/src/main/kotlin/kscience/kmath/commons/expressions/DiffExpression.kt similarity index 95% rename from kmath-commons/src/main/kotlin/scientifik/kmath/commons/expressions/DiffExpression.kt rename to kmath-commons/src/main/kotlin/kscience/kmath/commons/expressions/DiffExpression.kt index d556eb762..3ac908536 100644 --- a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/expressions/DiffExpression.kt +++ b/kmath-commons/src/main/kotlin/kscience/kmath/commons/expressions/DiffExpression.kt @@ -1,11 +1,11 @@ -package scientifik.kmath.commons.expressions +package kscience.kmath.commons.expressions +import kscience.kmath.expressions.Expression +import kscience.kmath.expressions.ExpressionAlgebra +import kscience.kmath.operations.ExtendedField +import kscience.kmath.operations.Field +import kscience.kmath.operations.invoke import org.apache.commons.math3.analysis.differentiation.DerivativeStructure -import scientifik.kmath.expressions.Expression -import scientifik.kmath.expressions.ExpressionAlgebra -import scientifik.kmath.operations.ExtendedField -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.invoke import kotlin.properties.ReadOnlyProperty /** diff --git a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/linear/CMMatrix.kt b/kmath-commons/src/main/kotlin/kscience/kmath/commons/linear/CMMatrix.kt similarity index 95% rename from kmath-commons/src/main/kotlin/scientifik/kmath/commons/linear/CMMatrix.kt rename to kmath-commons/src/main/kotlin/kscience/kmath/commons/linear/CMMatrix.kt index 72288a85e..377d167bc 100644 --- a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/linear/CMMatrix.kt +++ b/kmath-commons/src/main/kotlin/kscience/kmath/commons/linear/CMMatrix.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.commons.linear +package kscience.kmath.commons.linear +import kscience.kmath.linear.* +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.NDStructure import org.apache.commons.math3.linear.* -import scientifik.kmath.linear.* -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.NDStructure public class CMMatrix(public val origin: RealMatrix, features: Set? = null) : FeaturedMatrix { diff --git a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/linear/CMSolver.kt b/kmath-commons/src/main/kotlin/kscience/kmath/commons/linear/CMSolver.kt similarity index 91% rename from kmath-commons/src/main/kotlin/scientifik/kmath/commons/linear/CMSolver.kt rename to kmath-commons/src/main/kotlin/kscience/kmath/commons/linear/CMSolver.kt index 1e79aff21..210014e1a 100644 --- a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/linear/CMSolver.kt +++ b/kmath-commons/src/main/kotlin/kscience/kmath/commons/linear/CMSolver.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.commons.linear +package kscience.kmath.commons.linear +import kscience.kmath.linear.Point +import kscience.kmath.structures.Matrix import org.apache.commons.math3.linear.* -import scientifik.kmath.linear.Point -import scientifik.kmath.structures.Matrix public enum class CMDecomposition { LUP, diff --git a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/random/CMRandomGeneratorWrapper.kt b/kmath-commons/src/main/kotlin/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt similarity index 92% rename from kmath-commons/src/main/kotlin/scientifik/kmath/commons/random/CMRandomGeneratorWrapper.kt rename to kmath-commons/src/main/kotlin/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt index 3e60d7cdd..58609deae 100644 --- a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/random/CMRandomGeneratorWrapper.kt +++ b/kmath-commons/src/main/kotlin/kscience/kmath/commons/random/CMRandomGeneratorWrapper.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.commons.random +package kscience.kmath.commons.random -import scientifik.kmath.prob.RandomGenerator +import kscience.kmath.prob.RandomGenerator public class CMRandomGeneratorWrapper(public val factory: (IntArray) -> RandomGenerator) : org.apache.commons.math3.random.RandomGenerator { diff --git a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/transform/Transformations.kt b/kmath-commons/src/main/kotlin/kscience/kmath/commons/transform/Transformations.kt similarity index 94% rename from kmath-commons/src/main/kotlin/scientifik/kmath/commons/transform/Transformations.kt rename to kmath-commons/src/main/kotlin/kscience/kmath/commons/transform/Transformations.kt index 4af0d2b72..cd2896be6 100644 --- a/kmath-commons/src/main/kotlin/scientifik/kmath/commons/transform/Transformations.kt +++ b/kmath-commons/src/main/kotlin/kscience/kmath/commons/transform/Transformations.kt @@ -1,13 +1,13 @@ -package scientifik.kmath.commons.transform +package kscience.kmath.commons.transform import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map +import kscience.kmath.operations.Complex +import kscience.kmath.streaming.chunked +import kscience.kmath.streaming.spread +import kscience.kmath.structures.* import org.apache.commons.math3.transform.* -import scientifik.kmath.operations.Complex -import scientifik.kmath.streaming.chunked -import scientifik.kmath.streaming.spread -import scientifik.kmath.structures.* /** diff --git a/kmath-commons/src/test/kotlin/scientifik/kmath/commons/expressions/AutoDiffTest.kt b/kmath-commons/src/test/kotlin/kscience/kmath/commons/expressions/AutoDiffTest.kt similarity index 92% rename from kmath-commons/src/test/kotlin/scientifik/kmath/commons/expressions/AutoDiffTest.kt rename to kmath-commons/src/test/kotlin/kscience/kmath/commons/expressions/AutoDiffTest.kt index 3d8a1d5f0..f905e6818 100644 --- a/kmath-commons/src/test/kotlin/scientifik/kmath/commons/expressions/AutoDiffTest.kt +++ b/kmath-commons/src/test/kotlin/kscience/kmath/commons/expressions/AutoDiffTest.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.commons.expressions +package kscience.kmath.commons.expressions -import scientifik.kmath.expressions.invoke +import kscience.kmath.expressions.invoke import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.test.Test diff --git a/kmath-core/README.md b/kmath-core/README.md index aed33a257..9d05331f9 100644 --- a/kmath-core/README.md +++ b/kmath-core/README.md @@ -10,31 +10,31 @@ The core features of KMath: - Automatic differentiation. > #### Artifact: -> This module is distributed in the artifact `scientifik:kmath-core:0.1.4-dev-8`. +> This module is distributed in the artifact `kscience.kmath:kmath-core:0.1.4-dev-8`. > > **Gradle:** > > ```gradle > repositories { -> maven { url 'https://dl.bintray.com/mipt-npm/scientifik' } +> maven { url 'https://dl.bintray.com/mipt-npm/kscience' } > maven { url 'https://dl.bintray.com/mipt-npm/dev' } > maven { url https://dl.bintray.com/hotkeytlt/maven' } > } > > dependencies { -> implementation 'scientifik:kmath-core:0.1.4-dev-8' +> implementation 'kscience.kmath:kmath-core:0.1.4-dev-8' > } > ``` > **Gradle Kotlin DSL:** > > ```kotlin > repositories { -> maven("https://dl.bintray.com/mipt-npm/scientifik") +> maven("https://dl.bintray.com/mipt-npm/kscience") > maven("https://dl.bintray.com/mipt-npm/dev") > maven("https://dl.bintray.com/hotkeytlt/maven") > } > -> dependencies {`` -> implementation("scientifik:kmath-core:0.1.4-dev-8") +> dependencies { +> implementation("kscience.kmath:kmath-core:0.1.4-dev-8") > } > ``` diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/Domain.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/Domain.kt similarity index 83% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/Domain.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/domains/Domain.kt index c4c823bf2..5c3cff2c5 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/Domain.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/Domain.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.domains +package kscience.kmath.domains -import scientifik.kmath.linear.Point +import kscience.kmath.linear.Point /** * A simple geometric domain. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/HyperSquareDomain.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/HyperSquareDomain.kt similarity index 92% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/HyperSquareDomain.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/domains/HyperSquareDomain.kt index 61d443ff3..b45cf6bf5 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/HyperSquareDomain.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/HyperSquareDomain.kt @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package scientifik.kmath.domains +package kscience.kmath.domains -import scientifik.kmath.linear.Point -import scientifik.kmath.structures.RealBuffer -import scientifik.kmath.structures.indices +import kscience.kmath.linear.Point +import kscience.kmath.structures.RealBuffer +import kscience.kmath.structures.indices /** * diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/RealDomain.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/RealDomain.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/RealDomain.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/domains/RealDomain.kt index b1da63519..369b093bb 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/RealDomain.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/RealDomain.kt @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package scientifik.kmath.domains +package kscience.kmath.domains -import scientifik.kmath.linear.Point +import kscience.kmath.linear.Point /** * n-dimensional volume diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/UnconstrainedDomain.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/UnconstrainedDomain.kt similarity index 94% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/UnconstrainedDomain.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/domains/UnconstrainedDomain.kt index c637795df..e2efb51ab 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/UnconstrainedDomain.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/UnconstrainedDomain.kt @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package scientifik.kmath.domains +package kscience.kmath.domains -import scientifik.kmath.linear.Point +import kscience.kmath.linear.Point public class UnconstrainedDomain(public override val dimension: Int) : RealDomain { public override operator fun contains(point: Point): Boolean = true diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/UnivariateDomain.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/UnivariateDomain.kt similarity index 92% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/UnivariateDomain.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/domains/UnivariateDomain.kt index 066a8ae25..bf090f2e5 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/domains/UnivariateDomain.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/domains/UnivariateDomain.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.domains +package kscience.kmath.domains -import scientifik.kmath.linear.Point -import scientifik.kmath.structures.asBuffer +import kscience.kmath.linear.Point +import kscience.kmath.structures.asBuffer public inline class UnivariateDomain(public val range: ClosedFloatingPointRange) : RealDomain { public override val dimension: Int diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/Expression.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/Expression.kt similarity index 92% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/Expression.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/Expression.kt index a21735f27..5ade9e3ca 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/Expression.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/Expression.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.expressions +package kscience.kmath.expressions -import scientifik.kmath.operations.Algebra +import kscience.kmath.operations.Algebra /** * An elementary function that could be invoked on a map of arguments diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/FunctionalExpressionAlgebra.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt similarity index 99% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/FunctionalExpressionAlgebra.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt index 3804819e6..49844a2be 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/FunctionalExpressionAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.expressions +package kscience.kmath.expressions -import scientifik.kmath.operations.* +import kscience.kmath.operations.* internal class FunctionalUnaryOperation(val context: Algebra, val name: String, private val expr: Expression) : Expression { diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/expressionBuilders.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/expressionBuilders.kt similarity index 86% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/expressionBuilders.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/expressionBuilders.kt index 3af24b595..1702a5921 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/expressions/expressionBuilders.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/expressions/expressionBuilders.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.expressions +package kscience.kmath.expressions -import scientifik.kmath.operations.ExtendedField -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.Space +import kscience.kmath.operations.ExtendedField +import kscience.kmath.operations.Field +import kscience.kmath.operations.Ring +import kscience.kmath.operations.Space import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/BufferMatrix.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/BufferMatrix.kt similarity index 96% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/BufferMatrix.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/BufferMatrix.kt index d053f016c..d51f40890 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/BufferMatrix.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/BufferMatrix.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.Ring -import scientifik.kmath.structures.* +import kscience.kmath.operations.RealField +import kscience.kmath.operations.Ring +import kscience.kmath.structures.* /** * Basic implementation of Matrix space based on [NDStructure] diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/FeaturedMatrix.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/FeaturedMatrix.kt similarity index 92% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/FeaturedMatrix.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/FeaturedMatrix.kt index d5f8f8e20..65dc8df76 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/FeaturedMatrix.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/FeaturedMatrix.kt @@ -1,10 +1,9 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.operations.Ring -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.Structure2D -import scientifik.kmath.structures.asBuffer -import kotlin.contracts.contract +import kscience.kmath.operations.Ring +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.Structure2D +import kscience.kmath.structures.asBuffer import kotlin.math.sqrt /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/LUPDecomposition.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/LUPDecomposition.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/LUPDecomposition.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/LUPDecomposition.kt index ab23afff0..bb80bcafd 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/LUPDecomposition.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/LUPDecomposition.kt @@ -1,13 +1,12 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.invoke -import scientifik.kmath.structures.BufferAccessor2D -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.Structure2D -import kotlin.contracts.contract +import kscience.kmath.operations.Field +import kscience.kmath.operations.RealField +import kscience.kmath.operations.Ring +import kscience.kmath.operations.invoke +import kscience.kmath.structures.BufferAccessor2D +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.Structure2D import kotlin.reflect.KClass /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/LinearAlgebra.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/LinearAlgebra.kt similarity index 82% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/LinearAlgebra.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/LinearAlgebra.kt index 607d63bb1..034decc2f 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/LinearAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/LinearAlgebra.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.VirtualBuffer +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.VirtualBuffer public typealias Point = Buffer diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixBuilder.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixBuilder.kt similarity index 87% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixBuilder.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixBuilder.kt index 5efa53bc2..91c1ec824 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixBuilder.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixBuilder.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.BufferFactory -import scientifik.kmath.structures.Structure2D -import scientifik.kmath.structures.asBuffer +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.BufferFactory +import kscience.kmath.structures.Structure2D +import kscience.kmath.structures.asBuffer public class MatrixBuilder(public val rows: Int, public val columns: Int) { public operator fun invoke(vararg elements: T): FeaturedMatrix { diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixContext.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixContext.kt similarity index 90% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixContext.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixContext.kt index 13d4e68b9..d66530472 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixContext.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixContext.kt @@ -1,13 +1,13 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.SpaceOperations -import scientifik.kmath.operations.invoke -import scientifik.kmath.operations.sum -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.BufferFactory -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.asSequence +import kscience.kmath.operations.Ring +import kscience.kmath.operations.SpaceOperations +import kscience.kmath.operations.invoke +import kscience.kmath.operations.sum +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.BufferFactory +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.asSequence /** * Basic operations on matrices. Operates on [Matrix] diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixFeatures.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixFeatures.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixFeatures.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixFeatures.kt index 3448a2e7c..a82032e50 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/MatrixFeatures.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/MatrixFeatures.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.linear +package kscience.kmath.linear /** * A marker interface representing some matrix feature like diagonal, sparse, zero, etc. Features used to optimize matrix diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/VectorSpace.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/VectorSpace.kt similarity index 89% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/VectorSpace.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/VectorSpace.kt index a75523f7c..67056c6b2 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/VectorSpace.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/VectorSpace.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.Space -import scientifik.kmath.operations.invoke -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.BufferFactory +import kscience.kmath.operations.RealField +import kscience.kmath.operations.Space +import kscience.kmath.operations.invoke +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.BufferFactory /** * A linear space for vectors. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/VirtualMatrix.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/VirtualMatrix.kt similarity index 96% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/VirtualMatrix.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/linear/VirtualMatrix.kt index f6794ce01..e0a1d0026 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/linear/VirtualMatrix.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/linear/VirtualMatrix.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.structures.Matrix +import kscience.kmath.structures.Matrix public class VirtualMatrix( override val rowNum: Int, diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/AutoDiff.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/misc/AutoDiff.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/AutoDiff.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/misc/AutoDiff.kt index b09bcff9f..b4a610eb1 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/AutoDiff.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/misc/AutoDiff.kt @@ -1,11 +1,11 @@ -package scientifik.kmath.misc +package kscience.kmath.misc -import scientifik.kmath.linear.Point -import scientifik.kmath.operations.ExtendedField -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.invoke -import scientifik.kmath.operations.sum -import scientifik.kmath.structures.asBuffer +import kscience.kmath.linear.Point +import kscience.kmath.operations.ExtendedField +import kscience.kmath.operations.Field +import kscience.kmath.operations.invoke +import kscience.kmath.operations.sum +import kscience.kmath.structures.asBuffer import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/Grids.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/misc/Grids.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/Grids.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/misc/Grids.kt index cf3e93895..4d058c366 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/Grids.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/misc/Grids.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.misc +package kscience.kmath.misc import kotlin.math.abs diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/cumulative.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/misc/cumulative.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/cumulative.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/misc/cumulative.kt index 1712fef58..72d2f2388 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/misc/cumulative.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/misc/cumulative.kt @@ -1,8 +1,7 @@ -package scientifik.kmath.misc +package kscience.kmath.misc -import scientifik.kmath.operations.Space -import scientifik.kmath.operations.invoke -import kotlin.contracts.contract +import kscience.kmath.operations.Space +import kscience.kmath.operations.invoke import kotlin.jvm.JvmName /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Algebra.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt similarity index 99% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Algebra.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt index 1ea105f67..12a45615a 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Algebra.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Algebra.kt @@ -1,6 +1,4 @@ -package scientifik.kmath.operations - -import kotlin.contracts.contract +package kscience.kmath.operations /** * Stub for DSL the [Algebra] is. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/AlgebraElements.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/AlgebraElements.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/AlgebraElements.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/AlgebraElements.kt index 4ed1be0ee..94328dcb5 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/AlgebraElements.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/AlgebraElements.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations /** * The generic mathematics elements which is able to store its context diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/AlgebraExtensions.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/AlgebraExtensions.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/AlgebraExtensions.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/AlgebraExtensions.kt index 1020df7d9..657da6b4e 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/AlgebraExtensions.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/AlgebraExtensions.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations /** * Returns the sum of all elements in the iterable in this [Space]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/BigInt.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/BigInt.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/BigInt.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/BigInt.kt index d54557a1f..4590c58fc 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/BigInt.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/BigInt.kt @@ -1,9 +1,8 @@ -package scientifik.kmath.operations +package kscience.kmath.operations -import scientifik.kmath.operations.BigInt.Companion.BASE -import scientifik.kmath.operations.BigInt.Companion.BASE_SIZE -import scientifik.kmath.structures.* -import kotlin.contracts.contract +import kscience.kmath.operations.BigInt.Companion.BASE +import kscience.kmath.operations.BigInt.Companion.BASE_SIZE +import kscience.kmath.structures.* import kotlin.math.log2 import kotlin.math.max import kotlin.math.min diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Complex.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Complex.kt similarity index 94% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Complex.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Complex.kt index 05a592e97..c0faf5dc5 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Complex.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/Complex.kt @@ -1,12 +1,11 @@ -package scientifik.kmath.operations +package kscience.kmath.operations -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.MemoryBuffer -import scientifik.kmath.structures.MutableBuffer -import scientifik.memory.MemoryReader -import scientifik.memory.MemorySpec -import scientifik.memory.MemoryWriter -import kotlin.contracts.contract +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.MemoryBuffer +import kscience.kmath.structures.MutableBuffer +import kscience.memory.MemoryReader +import kscience.memory.MemorySpec +import kscience.memory.MemoryWriter import kotlin.math.* /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/NumberAlgebra.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/NumberAlgebra.kt similarity index 99% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/NumberAlgebra.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/NumberAlgebra.kt index 150a0d582..a2b33a0c4 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/NumberAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/NumberAlgebra.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations import kotlin.math.abs import kotlin.math.pow as kpow diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/OptionalOperations.kt similarity index 99% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/operations/OptionalOperations.kt index 101f62293..f31d61ae1 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/operations/OptionalOperations.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations /** * A container for trigonometric operations for specific type. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BoxingNDField.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BoxingNDField.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BoxingNDField.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BoxingNDField.kt index a258c7a2f..c3c859f7a 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BoxingNDField.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BoxingNDField.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.FieldElement +import kscience.kmath.operations.Field +import kscience.kmath.operations.FieldElement public class BoxingNDField>( public override val shape: IntArray, diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BoxingNDRing.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BoxingNDRing.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BoxingNDRing.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BoxingNDRing.kt index de83768a0..461b0387c 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BoxingNDRing.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BoxingNDRing.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.RingElement +import kscience.kmath.operations.Ring +import kscience.kmath.operations.RingElement public class BoxingNDRing>( override val shape: IntArray, diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferAccessor2D.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferAccessor2D.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferAccessor2D.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferAccessor2D.kt index 0a02fdc8f..00fc4aef0 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferAccessor2D.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferAccessor2D.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.structures +package kscience.kmath.structures import kotlin.reflect.KClass diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferedNDAlgebra.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferedNDAlgebra.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferedNDAlgebra.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferedNDAlgebra.kt index 4b1a67805..66b4f19e1 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferedNDAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferedNDAlgebra.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.* +import kscience.kmath.operations.* public interface BufferedNDAlgebra : NDAlgebra> { public val strides: Strides diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferedNDElement.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferedNDElement.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferedNDElement.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferedNDElement.kt index 4de31d101..d53702566 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/BufferedNDElement.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/BufferedNDElement.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.* +import kscience.kmath.operations.* /** * Base class for an element with context, containing strides diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Buffers.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Buffers.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt index 4326159d3..53587e503 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Buffers.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Buffers.kt @@ -1,8 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.complex -import kotlin.contracts.contract +import kscience.kmath.operations.Complex +import kscience.kmath.operations.complex import kotlin.reflect.KClass /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ComplexNDField.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ComplexNDField.kt similarity index 96% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ComplexNDField.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ComplexNDField.kt index 87dd11f59..f1f1074e5 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ComplexNDField.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ComplexNDField.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.ComplexField -import scientifik.kmath.operations.FieldElement -import scientifik.kmath.operations.complex +import kscience.kmath.operations.Complex +import kscience.kmath.operations.ComplexField +import kscience.kmath.operations.FieldElement +import kscience.kmath.operations.complex import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ExtendedNDField.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ExtendedNDField.kt similarity index 94% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ExtendedNDField.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ExtendedNDField.kt index 12731ff86..a9fa2763b 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ExtendedNDField.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ExtendedNDField.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.ExtendedField +import kscience.kmath.operations.ExtendedField /** * [ExtendedField] over [NDStructure]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/FlaggedBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/FlaggedBuffer.kt similarity index 96% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/FlaggedBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/FlaggedBuffer.kt index f627ede07..e3fda0e10 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/FlaggedBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/FlaggedBuffer.kt @@ -1,6 +1,5 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import kotlin.contracts.contract import kotlin.experimental.and /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/FloatBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/FloatBuffer.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/FloatBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/FloatBuffer.kt index 4bf7d6ad2..e96c45572 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/FloatBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/FloatBuffer.kt @@ -1,6 +1,4 @@ -package scientifik.kmath.structures - -import kotlin.contracts.contract +package kscience.kmath.structures /** * Specialized [MutableBuffer] implementation over [FloatArray]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/IntBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/IntBuffer.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/IntBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/IntBuffer.kt index 7daa48201..0fe68803b 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/IntBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/IntBuffer.kt @@ -1,6 +1,4 @@ -package scientifik.kmath.structures - -import kotlin.contracts.contract +package kscience.kmath.structures /** * Specialized [MutableBuffer] implementation over [IntArray]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/LongBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/LongBuffer.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/LongBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/LongBuffer.kt index f87fdc705..87853c251 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/LongBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/LongBuffer.kt @@ -1,6 +1,4 @@ -package scientifik.kmath.structures - -import kotlin.contracts.contract +package kscience.kmath.structures /** * Specialized [MutableBuffer] implementation over [LongArray]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/MemoryBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/MemoryBuffer.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/MemoryBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/MemoryBuffer.kt index 2936932d0..b7e6a8218 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/MemoryBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/MemoryBuffer.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.memory.* +import kscience.memory.* /** * A non-boxing buffer over [Memory] object. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDAlgebra.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDAlgebra.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDAlgebra.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDAlgebra.kt index a6212469d..28eaef2f1 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDAlgebra.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.Space +import kscience.kmath.operations.Complex +import kscience.kmath.operations.Field +import kscience.kmath.operations.Ring +import kscience.kmath.operations.Space /** * An exception is thrown when the expected ans actual shape of NDArray differs diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDElement.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDElement.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDElement.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDElement.kt index 99a87f374..f2f565064 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDElement.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDElement.kt @@ -1,10 +1,9 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.Space -import kotlin.contracts.contract +import kscience.kmath.operations.Field +import kscience.kmath.operations.RealField +import kscience.kmath.operations.Ring +import kscience.kmath.operations.Space /** * The root for all [NDStructure] based algebra elements. Does not implement algebra element root because of problems with recursive self-types diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDStructure.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDStructure.kt similarity index 99% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDStructure.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDStructure.kt index d3007bb09..4ab49c9bc 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/NDStructure.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/NDStructure.kt @@ -1,6 +1,5 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import kotlin.contracts.contract import kotlin.jvm.JvmName import kotlin.reflect.KClass diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealBuffer.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealBuffer.kt index dbb599c85..2a03e2dd3 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealBuffer.kt @@ -1,6 +1,4 @@ -package scientifik.kmath.structures - -import kotlin.contracts.contract +package kscience.kmath.structures /** * Specialized [MutableBuffer] implementation over [DoubleArray]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealBufferField.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealBufferField.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealBufferField.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealBufferField.kt index 363ce0275..f7b2ee31e 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealBufferField.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealBufferField.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.ExtendedField -import scientifik.kmath.operations.ExtendedFieldOperations +import kscience.kmath.operations.ExtendedField +import kscience.kmath.operations.ExtendedFieldOperations import kotlin.math.* /** diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealNDField.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealNDField.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealNDField.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealNDField.kt index 94855d670..ed28fb9f2 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/RealNDField.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/RealNDField.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.FieldElement -import scientifik.kmath.operations.RealField +import kscience.kmath.operations.FieldElement +import kscience.kmath.operations.RealField public typealias RealNDElement = BufferedNDFieldElement diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ShortBuffer.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ShortBuffer.kt similarity index 95% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ShortBuffer.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ShortBuffer.kt index b364630f7..0d9222320 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ShortBuffer.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ShortBuffer.kt @@ -1,6 +1,4 @@ -package scientifik.kmath.structures - -import kotlin.contracts.contract +package kscience.kmath.structures /** * Specialized [MutableBuffer] implementation over [ShortArray]. diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ShortNDRing.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ShortNDRing.kt similarity index 96% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ShortNDRing.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ShortNDRing.kt index 30e87fd6a..3b506a26a 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/ShortNDRing.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/ShortNDRing.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.RingElement -import scientifik.kmath.operations.ShortRing +import kscience.kmath.operations.RingElement +import kscience.kmath.operations.ShortRing public typealias ShortNDElement = BufferedNDRingElement diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Structure1D.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Structure1D.kt similarity index 98% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Structure1D.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Structure1D.kt index 72602695f..af5cc9e3f 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Structure1D.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Structure1D.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.structures +package kscience.kmath.structures /** * A structure that is guaranteed to be one-dimensional diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Structure2D.kt b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Structure2D.kt similarity index 97% rename from kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Structure2D.kt rename to kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Structure2D.kt index 7633d8898..25fdf3f3d 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/structures/Structure2D.kt +++ b/kmath-core/src/commonMain/kotlin/kscience/kmath/structures/Structure2D.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.structures +package kscience.kmath.structures /** * A structure that is guaranteed to be two-dimensional diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/expressions/ExpressionFieldTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/expressions/ExpressionFieldTest.kt similarity index 87% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/expressions/ExpressionFieldTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/expressions/ExpressionFieldTest.kt index 485de08b4..1d3f520f6 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/expressions/ExpressionFieldTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/expressions/ExpressionFieldTest.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.expressions +package kscience.kmath.expressions -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.ComplexField -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.Complex +import kscience.kmath.operations.ComplexField +import kscience.kmath.operations.RealField +import kscience.kmath.operations.invoke import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/MatrixTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/linear/MatrixTest.kt similarity index 91% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/MatrixTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/linear/MatrixTest.kt index 52a2f80a6..7cfa25a66 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/MatrixTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/linear/MatrixTest.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.NDStructure -import scientifik.kmath.structures.as2D +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.NDStructure +import kscience.kmath.structures.as2D import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/RealLUSolverTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/linear/RealLUSolverTest.kt similarity index 92% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/RealLUSolverTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/linear/RealLUSolverTest.kt index 9de9fb575..de07d3639 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/RealLUSolverTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/linear/RealLUSolverTest.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.structures.Matrix +import kscience.kmath.structures.Matrix import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/VectorSpaceTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/linear/VectorSpaceTest.kt similarity index 100% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/linear/VectorSpaceTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/linear/VectorSpaceTest.kt diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/misc/AutoDiffTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/misc/AutoDiffTest.kt similarity index 98% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/misc/AutoDiffTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/misc/AutoDiffTest.kt index 91d32cf8e..3b1813185 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/misc/AutoDiffTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/misc/AutoDiffTest.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.misc +package kscience.kmath.misc -import scientifik.kmath.operations.RealField -import scientifik.kmath.structures.asBuffer +import kscience.kmath.operations.RealField +import kscience.kmath.structures.asBuffer import kotlin.math.PI import kotlin.math.pow import kotlin.math.sqrt diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/misc/CumulativeKtTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/misc/CumulativeKtTest.kt similarity index 90% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/misc/CumulativeKtTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/misc/CumulativeKtTest.kt index 82ea5318f..1e6d2fd5d 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/misc/CumulativeKtTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/misc/CumulativeKtTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.misc +package kscience.kmath.misc import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntAlgebraTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntAlgebraTest.kt similarity index 94% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntAlgebraTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntAlgebraTest.kt index d140f1017..78611e5d2 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntAlgebraTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntAlgebraTest.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.operations +package kscience.kmath.operations -import scientifik.kmath.operations.internal.RingVerifier +import kscience.kmath.operations.internal.RingVerifier import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntConstructorTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntConstructorTest.kt similarity index 93% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntConstructorTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntConstructorTest.kt index 5e3f6d1b0..ba2582bbf 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntConstructorTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntConstructorTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntConversionsTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntConversionsTest.kt similarity index 96% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntConversionsTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntConversionsTest.kt index 41df1968d..0b433c436 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntConversionsTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntConversionsTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntOperationsTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntOperationsTest.kt similarity index 99% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntOperationsTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntOperationsTest.kt index b7f4cf43b..a3ed85c7b 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/BigIntOperationsTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/BigIntOperationsTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/ComplexFieldTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/ComplexFieldTest.kt similarity index 96% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/ComplexFieldTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/ComplexFieldTest.kt index 2c480ebea..c0b4853f4 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/ComplexFieldTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/ComplexFieldTest.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.operations +package kscience.kmath.operations -import scientifik.kmath.operations.internal.FieldVerifier +import kscience.kmath.operations.internal.FieldVerifier import kotlin.math.PI import kotlin.math.abs import kotlin.test.Test diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/ComplexTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/ComplexTest.kt similarity index 96% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/ComplexTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/ComplexTest.kt index e8d698c70..f8b9b7262 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/ComplexTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/ComplexTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/RealFieldTest.kt similarity index 75% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/RealFieldTest.kt index a168b4afd..5705733cf 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/RealFieldTest.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.operations +package kscience.kmath.operations -import scientifik.kmath.operations.internal.FieldVerifier +import kscience.kmath.operations.internal.FieldVerifier import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/AlgebraicVerifier.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/AlgebraicVerifier.kt similarity index 55% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/AlgebraicVerifier.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/AlgebraicVerifier.kt index cb097d46e..7334c13a3 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/AlgebraicVerifier.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/AlgebraicVerifier.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.operations.internal +package kscience.kmath.operations.internal -import scientifik.kmath.operations.Algebra +import kscience.kmath.operations.Algebra internal interface AlgebraicVerifier where A : Algebra { val algebra: A diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/FieldVerifier.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/FieldVerifier.kt similarity index 88% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/FieldVerifier.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/FieldVerifier.kt index 973fd00b1..1ca09ab0c 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/FieldVerifier.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/FieldVerifier.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.operations.internal +package kscience.kmath.operations.internal -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.Field +import kscience.kmath.operations.invoke import kotlin.test.assertEquals import kotlin.test.assertNotEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/RingVerifier.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/RingVerifier.kt similarity index 92% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/RingVerifier.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/RingVerifier.kt index 047a213e9..863169b9b 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/RingVerifier.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/RingVerifier.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.operations.internal +package kscience.kmath.operations.internal -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.Ring +import kscience.kmath.operations.invoke import kotlin.test.assertEquals internal open class RingVerifier(override val algebra: Ring, a: T, b: T, c: T, x: Number) : diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/SpaceVerifier.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/SpaceVerifier.kt similarity index 92% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/SpaceVerifier.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/SpaceVerifier.kt index bc241c97d..4dc855829 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/internal/SpaceVerifier.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/operations/internal/SpaceVerifier.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.operations.internal +package kscience.kmath.operations.internal -import scientifik.kmath.operations.Space -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.Space +import kscience.kmath.operations.invoke import kotlin.test.assertEquals import kotlin.test.assertNotEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/ComplexBufferSpecTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/structures/ComplexBufferSpecTest.kt similarity index 68% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/ComplexBufferSpecTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/structures/ComplexBufferSpecTest.kt index cbbe6f0f4..4837236db 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/ComplexBufferSpecTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/structures/ComplexBufferSpecTest.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Complex -import scientifik.kmath.operations.complex +import kscience.kmath.operations.Complex +import kscience.kmath.operations.complex import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/NDFieldTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/structures/NDFieldTest.kt similarity index 87% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/NDFieldTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/structures/NDFieldTest.kt index 7abeefca6..79b56ea4a 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/NDFieldTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/structures/NDFieldTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.structures +package kscience.kmath.structures import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/NumberNDFieldTest.kt b/kmath-core/src/commonTest/kotlin/kscience/kmath/structures/NumberNDFieldTest.kt similarity index 90% rename from kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/NumberNDFieldTest.kt rename to kmath-core/src/commonTest/kotlin/kscience/kmath/structures/NumberNDFieldTest.kt index b7e2594ec..f5e008ef3 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/structures/NumberNDFieldTest.kt +++ b/kmath-core/src/commonTest/kotlin/kscience/kmath/structures/NumberNDFieldTest.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.structures +package kscience.kmath.structures -import scientifik.kmath.operations.Norm -import scientifik.kmath.operations.invoke -import scientifik.kmath.structures.NDElement.Companion.real2D +import kscience.kmath.operations.Norm +import kscience.kmath.operations.invoke +import kscience.kmath.structures.NDElement.Companion.real2D import kotlin.math.abs import kotlin.math.pow import kotlin.test.Test diff --git a/kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt b/kmath-core/src/jvmMain/kotlin/kscience/kmath/operations/BigNumbers.kt similarity index 98% rename from kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt rename to kmath-core/src/jvmMain/kotlin/kscience/kmath/operations/BigNumbers.kt index 7310dcc68..2f0978237 100644 --- a/kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt +++ b/kmath-core/src/jvmMain/kotlin/kscience/kmath/operations/BigNumbers.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.operations +package kscience.kmath.operations import java.math.BigDecimal import java.math.BigInteger diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/BlockingIntChain.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/BlockingIntChain.kt similarity index 89% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/BlockingIntChain.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/BlockingIntChain.kt index 25a95273d..6088267a2 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/BlockingIntChain.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/BlockingIntChain.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.chains +package kscience.kmath.chains /** * Performance optimized chain for integer values diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/BlockingRealChain.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/BlockingRealChain.kt similarity index 90% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/BlockingRealChain.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/BlockingRealChain.kt index 867fee19f..718b3a18b 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/BlockingRealChain.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/BlockingRealChain.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.chains +package kscience.kmath.chains /** * Performance optimized chain for real values diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/Chain.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/Chain.kt similarity index 99% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/Chain.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/Chain.kt index e27290fbb..8c15e52c7 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/Chain.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/Chain.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package scientifik.kmath.chains +package kscience.kmath.chains import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.FlowCollector diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/flowExtra.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/flowExtra.kt similarity index 80% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/flowExtra.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/flowExtra.kt index 389e0b6db..6b14057fe 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/chains/flowExtra.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/chains/flowExtra.kt @@ -1,13 +1,13 @@ -package scientifik.kmath.chains +package kscience.kmath.chains import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.runningReduce import kotlinx.coroutines.flow.scan -import scientifik.kmath.operations.Space -import scientifik.kmath.operations.SpaceOperations -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.Space +import kscience.kmath.operations.SpaceOperations +import kscience.kmath.operations.invoke @ExperimentalCoroutinesApi public fun Flow.cumulativeSum(space: SpaceOperations): Flow = diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/coroutines/coroutinesExtra.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/coroutines/coroutinesExtra.kt similarity index 98% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/coroutines/coroutinesExtra.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/coroutines/coroutinesExtra.kt index 86bc2d6e3..351207111 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/coroutines/coroutinesExtra.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/coroutines/coroutinesExtra.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.coroutines +package kscience.kmath.coroutines import kotlinx.coroutines.* import kotlinx.coroutines.channels.produce diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/streaming/BufferFlow.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/streaming/BufferFlow.kt similarity index 89% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/streaming/BufferFlow.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/streaming/BufferFlow.kt index 991642787..328a7807c 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/streaming/BufferFlow.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/streaming/BufferFlow.kt @@ -1,12 +1,12 @@ -package scientifik.kmath.streaming +package kscience.kmath.streaming import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.* -import scientifik.kmath.chains.BlockingRealChain -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.BufferFactory -import scientifik.kmath.structures.RealBuffer -import scientifik.kmath.structures.asBuffer +import kscience.kmath.chains.BlockingRealChain +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.BufferFactory +import kscience.kmath.structures.RealBuffer +import kscience.kmath.structures.asBuffer /** * Create a [Flow] from buffer diff --git a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/streaming/RingBuffer.kt b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/streaming/RingBuffer.kt similarity index 92% rename from kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/streaming/RingBuffer.kt rename to kmath-coroutines/src/commonMain/kotlin/kscience/kmath/streaming/RingBuffer.kt index b30100d43..385bbaae2 100644 --- a/kmath-coroutines/src/commonMain/kotlin/scientifik/kmath/streaming/RingBuffer.kt +++ b/kmath-coroutines/src/commonMain/kotlin/kscience/kmath/streaming/RingBuffer.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.streaming +package kscience.kmath.streaming import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.MutableBuffer -import scientifik.kmath.structures.VirtualBuffer +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.MutableBuffer +import kscience.kmath.structures.VirtualBuffer /** * Thread-safe ring buffer diff --git a/kmath-coroutines/src/jvmMain/kotlin/scientifik/kmath/chains/ChainExt.kt b/kmath-coroutines/src/jvmMain/kotlin/kscience/kmath/chains/ChainExt.kt similarity index 93% rename from kmath-coroutines/src/jvmMain/kotlin/scientifik/kmath/chains/ChainExt.kt rename to kmath-coroutines/src/jvmMain/kotlin/kscience/kmath/chains/ChainExt.kt index c0df59645..3dfeddbac 100644 --- a/kmath-coroutines/src/jvmMain/kotlin/scientifik/kmath/chains/ChainExt.kt +++ b/kmath-coroutines/src/jvmMain/kotlin/kscience/kmath/chains/ChainExt.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.chains +package kscience.kmath.chains import kotlinx.coroutines.runBlocking diff --git a/kmath-coroutines/src/jvmMain/kotlin/scientifik/kmath/structures/LazyNDStructure.kt b/kmath-coroutines/src/jvmMain/kotlin/kscience/kmath/structures/LazyNDStructure.kt similarity index 96% rename from kmath-coroutines/src/jvmMain/kotlin/scientifik/kmath/structures/LazyNDStructure.kt rename to kmath-coroutines/src/jvmMain/kotlin/kscience/kmath/structures/LazyNDStructure.kt index 82950159b..bb0d19c23 100644 --- a/kmath-coroutines/src/jvmMain/kotlin/scientifik/kmath/structures/LazyNDStructure.kt +++ b/kmath-coroutines/src/jvmMain/kotlin/kscience/kmath/structures/LazyNDStructure.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.structures +package kscience.kmath.structures import kotlinx.coroutines.* -import scientifik.kmath.coroutines.Math +import kscience.kmath.coroutines.Math public class LazyNDStructure( public val scope: CoroutineScope, diff --git a/kmath-coroutines/src/jvmTest/kotlin/scientifik/kmath/streaming/BufferFlowTest.kt b/kmath-coroutines/src/jvmTest/kotlin/kscience/kmath/streaming/BufferFlowTest.kt similarity index 88% rename from kmath-coroutines/src/jvmTest/kotlin/scientifik/kmath/streaming/BufferFlowTest.kt rename to kmath-coroutines/src/jvmTest/kotlin/kscience/kmath/streaming/BufferFlowTest.kt index d17e4d86b..a9bf38c12 100644 --- a/kmath-coroutines/src/jvmTest/kotlin/scientifik/kmath/streaming/BufferFlowTest.kt +++ b/kmath-coroutines/src/jvmTest/kotlin/kscience/kmath/streaming/BufferFlowTest.kt @@ -1,12 +1,12 @@ -package scientifik.kmath.streaming +package kscience.kmath.streaming import kotlinx.coroutines.* import kotlinx.coroutines.flow.asFlow import kotlinx.coroutines.flow.collect +import kscience.kmath.coroutines.async +import kscience.kmath.coroutines.collect +import kscience.kmath.coroutines.mapParallel import org.junit.jupiter.api.Timeout -import scientifik.kmath.coroutines.async -import scientifik.kmath.coroutines.collect -import scientifik.kmath.coroutines.mapParallel import java.util.concurrent.Executors import kotlin.test.Test diff --git a/kmath-coroutines/src/jvmTest/kotlin/scientifik/kmath/streaming/RingBufferTest.kt b/kmath-coroutines/src/jvmTest/kotlin/kscience/kmath/streaming/RingBufferTest.kt similarity index 91% rename from kmath-coroutines/src/jvmTest/kotlin/scientifik/kmath/streaming/RingBufferTest.kt rename to kmath-coroutines/src/jvmTest/kotlin/kscience/kmath/streaming/RingBufferTest.kt index 630749861..5bb0c1d40 100644 --- a/kmath-coroutines/src/jvmTest/kotlin/scientifik/kmath/streaming/RingBufferTest.kt +++ b/kmath-coroutines/src/jvmTest/kotlin/kscience/kmath/streaming/RingBufferTest.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.streaming +package kscience.kmath.streaming import kotlinx.coroutines.flow.* import kotlinx.coroutines.runBlocking -import scientifik.kmath.structures.asSequence +import kscience.kmath.structures.asSequence import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-dimensions/src/commonMain/kotlin/scientifik/kmath/dimensions/Dimensions.kt b/kmath-dimensions/src/commonMain/kotlin/kscience/kmath/dimensions/Dimensions.kt similarity index 95% rename from kmath-dimensions/src/commonMain/kotlin/scientifik/kmath/dimensions/Dimensions.kt rename to kmath-dimensions/src/commonMain/kotlin/kscience/kmath/dimensions/Dimensions.kt index e96367443..f49e1e0f0 100644 --- a/kmath-dimensions/src/commonMain/kotlin/scientifik/kmath/dimensions/Dimensions.kt +++ b/kmath-dimensions/src/commonMain/kotlin/kscience/kmath/dimensions/Dimensions.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.dimensions +package kscience.kmath.dimensions import kotlin.reflect.KClass diff --git a/kmath-dimensions/src/commonMain/kotlin/scientifik/kmath/dimensions/Wrappers.kt b/kmath-dimensions/src/commonMain/kotlin/kscience/kmath/dimensions/Wrappers.kt similarity index 93% rename from kmath-dimensions/src/commonMain/kotlin/scientifik/kmath/dimensions/Wrappers.kt rename to kmath-dimensions/src/commonMain/kotlin/kscience/kmath/dimensions/Wrappers.kt index 120069d83..4111cb78d 100644 --- a/kmath-dimensions/src/commonMain/kotlin/scientifik/kmath/dimensions/Wrappers.kt +++ b/kmath-dimensions/src/commonMain/kotlin/kscience/kmath/dimensions/Wrappers.kt @@ -1,14 +1,14 @@ -package scientifik.kmath.dimensions +package kscience.kmath.dimensions -import scientifik.kmath.linear.GenericMatrixContext -import scientifik.kmath.linear.MatrixContext -import scientifik.kmath.linear.Point -import scientifik.kmath.linear.transpose -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.invoke -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.Structure2D +import kscience.kmath.linear.GenericMatrixContext +import kscience.kmath.linear.MatrixContext +import kscience.kmath.linear.Point +import kscience.kmath.linear.transpose +import kscience.kmath.operations.RealField +import kscience.kmath.operations.Ring +import kscience.kmath.operations.invoke +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.Structure2D /** * A matrix with compile-time controlled dimension diff --git a/kmath-dimensions/src/commonTest/kotlin/scientifik/dimensions/DMatrixContextTest.kt b/kmath-dimensions/src/commonTest/kotlin/scientifik/dimensions/DMatrixContextTest.kt index dc7acdcc2..f44b16753 100644 --- a/kmath-dimensions/src/commonTest/kotlin/scientifik/dimensions/DMatrixContextTest.kt +++ b/kmath-dimensions/src/commonTest/kotlin/scientifik/dimensions/DMatrixContextTest.kt @@ -1,8 +1,8 @@ -package scientifik.dimensions +package kscience.dimensions -import scientifik.kmath.dimensions.D2 -import scientifik.kmath.dimensions.D3 -import scientifik.kmath.dimensions.DMatrixContext +import kscience.kmath.dimensions.D2 +import kscience.kmath.dimensions.D3 +import kscience.kmath.dimensions.DMatrixContext import kotlin.test.Test internal class DMatrixContextTest { diff --git a/kmath-dimensions/src/jsMain/kotlin/scientifik/kmath/dimensions/dim.kt b/kmath-dimensions/src/jsMain/kotlin/kscience/kmath/dimensions/dim.kt similarity index 94% rename from kmath-dimensions/src/jsMain/kotlin/scientifik/kmath/dimensions/dim.kt rename to kmath-dimensions/src/jsMain/kotlin/kscience/kmath/dimensions/dim.kt index 139f77e92..4230da156 100644 --- a/kmath-dimensions/src/jsMain/kotlin/scientifik/kmath/dimensions/dim.kt +++ b/kmath-dimensions/src/jsMain/kotlin/kscience/kmath/dimensions/dim.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.dimensions +package kscience.kmath.dimensions import kotlin.reflect.KClass diff --git a/kmath-dimensions/src/jvmMain/kotlin/scientifik/kmath/dimensions/dim.kt b/kmath-dimensions/src/jvmMain/kotlin/kscience/kmath/dimensions/dim.kt similarity index 91% rename from kmath-dimensions/src/jvmMain/kotlin/scientifik/kmath/dimensions/dim.kt rename to kmath-dimensions/src/jvmMain/kotlin/kscience/kmath/dimensions/dim.kt index 714133ecb..dec3979ef 100644 --- a/kmath-dimensions/src/jvmMain/kotlin/scientifik/kmath/dimensions/dim.kt +++ b/kmath-dimensions/src/jvmMain/kotlin/kscience/kmath/dimensions/dim.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.dimensions +package kscience.kmath.dimensions import kotlin.reflect.KClass diff --git a/kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/RealVector.kt b/kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/RealVector.kt similarity index 76% rename from kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/RealVector.kt rename to kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/RealVector.kt index 474a701ca..ba5f8444b 100644 --- a/kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/RealVector.kt +++ b/kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/RealVector.kt @@ -1,15 +1,15 @@ -package scientifik.kmath.real +package kscience.kmath.real -import scientifik.kmath.linear.BufferVectorSpace -import scientifik.kmath.linear.Point -import scientifik.kmath.linear.VectorSpace -import scientifik.kmath.operations.Norm -import scientifik.kmath.operations.RealField -import scientifik.kmath.operations.SpaceElement -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.RealBuffer -import scientifik.kmath.structures.asBuffer -import scientifik.kmath.structures.asIterable +import kscience.kmath.linear.BufferVectorSpace +import kscience.kmath.linear.Point +import kscience.kmath.linear.VectorSpace +import kscience.kmath.operations.Norm +import kscience.kmath.operations.RealField +import kscience.kmath.operations.SpaceElement +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.RealBuffer +import kscience.kmath.structures.asBuffer +import kscience.kmath.structures.asIterable import kotlin.math.sqrt public typealias RealPoint = Point diff --git a/kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/realBuffer.kt b/kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/realBuffer.kt similarity index 67% rename from kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/realBuffer.kt rename to kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/realBuffer.kt index 480481d97..0a2119b0d 100644 --- a/kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/realBuffer.kt +++ b/kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/realBuffer.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.real +package kscience.kmath.real -import scientifik.kmath.structures.RealBuffer +import kscience.kmath.structures.RealBuffer /** * Simplified [RealBuffer] to array comparison diff --git a/kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/realMatrix.kt b/kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/realMatrix.kt similarity index 91% rename from kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/realMatrix.kt rename to kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/realMatrix.kt index 1bc5f0a5b..1860b5870 100644 --- a/kmath-for-real/src/commonMain/kotlin/scientifik/kmath/real/realMatrix.kt +++ b/kmath-for-real/src/commonMain/kotlin/kscience/kmath/real/realMatrix.kt @@ -1,15 +1,14 @@ -package scientifik.kmath.real +package kscience.kmath.real -import scientifik.kmath.linear.MatrixContext -import scientifik.kmath.linear.RealMatrixContext.elementContext -import scientifik.kmath.linear.VirtualMatrix -import scientifik.kmath.operations.invoke -import scientifik.kmath.operations.sum -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.Matrix -import scientifik.kmath.structures.RealBuffer -import scientifik.kmath.structures.asIterable -import kotlin.contracts.contract +import kscience.kmath.linear.MatrixContext +import kscience.kmath.linear.RealMatrixContext.elementContext +import kscience.kmath.linear.VirtualMatrix +import kscience.kmath.operations.invoke +import kscience.kmath.operations.sum +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.Matrix +import kscience.kmath.structures.RealBuffer +import kscience.kmath.structures.asIterable import kotlin.math.pow /* diff --git a/kmath-for-real/src/commonTest/kotlin/scientifik/kmath/linear/VectorTest.kt b/kmath-for-real/src/commonTest/kotlin/kscience/kmath/linear/VectorTest.kt similarity index 88% rename from kmath-for-real/src/commonTest/kotlin/scientifik/kmath/linear/VectorTest.kt rename to kmath-for-real/src/commonTest/kotlin/kscience/kmath/linear/VectorTest.kt index e24037953..17ff4ef20 100644 --- a/kmath-for-real/src/commonTest/kotlin/scientifik/kmath/linear/VectorTest.kt +++ b/kmath-for-real/src/commonTest/kotlin/kscience/kmath/linear/VectorTest.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.linear +package kscience.kmath.linear -import scientifik.kmath.operations.invoke -import scientifik.kmath.real.RealVector +import kscience.kmath.operations.invoke +import kscience.kmath.real.RealVector import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-for-real/src/commonTest/kotlin/scientific.kmath.real/RealMatrixTest.kt b/kmath-for-real/src/commonTest/kotlin/scientific.kmath.real/RealMatrixTest.kt index baf1db8b5..859938481 100644 --- a/kmath-for-real/src/commonTest/kotlin/scientific.kmath.real/RealMatrixTest.kt +++ b/kmath-for-real/src/commonTest/kotlin/scientific.kmath.real/RealMatrixTest.kt @@ -1,9 +1,9 @@ package scientific.kmath.real -import scientifik.kmath.linear.VirtualMatrix -import scientifik.kmath.linear.build -import scientifik.kmath.real.* -import scientifik.kmath.structures.Matrix +import kscience.kmath.linear.VirtualMatrix +import kscience.kmath.linear.build +import kscience.kmath.real.* +import kscience.kmath.structures.Matrix import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/Piecewise.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/Piecewise.kt similarity index 93% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/Piecewise.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/Piecewise.kt index 52030f0fd..a8c020c05 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/Piecewise.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/Piecewise.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.functions +package kscience.kmath.functions -import scientifik.kmath.operations.Ring +import kscience.kmath.operations.Ring public fun interface Piecewise { public fun findPiece(arg: T): R? diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/Polynomial.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/Polynomial.kt similarity index 93% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/Polynomial.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/Polynomial.kt index 3d97936f9..c513a6889 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/Polynomial.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/Polynomial.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.functions +package kscience.kmath.functions -import scientifik.kmath.operations.Ring -import scientifik.kmath.operations.Space -import scientifik.kmath.operations.invoke +import kscience.kmath.operations.Ring +import kscience.kmath.operations.Space +import kscience.kmath.operations.invoke import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.math.max diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/functions.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/functions.kt similarity index 88% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/functions.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/functions.kt index 2b6073e07..d780c16f3 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/functions/functions.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/functions/functions.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.functions +package kscience.kmath.functions -import scientifik.kmath.operations.Algebra -import scientifik.kmath.operations.RealField +import kscience.kmath.operations.Algebra +import kscience.kmath.operations.RealField // TODO make fun interface when KT-41770 is fixed /** diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/Interpolator.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/Interpolator.kt similarity index 83% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/Interpolator.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/Interpolator.kt index a53cafece..0620b4aa8 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/Interpolator.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/Interpolator.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.interpolation +package kscience.kmath.interpolation -import scientifik.kmath.functions.PiecewisePolynomial -import scientifik.kmath.functions.value -import scientifik.kmath.operations.Ring -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.asBuffer +import kscience.kmath.functions.PiecewisePolynomial +import kscience.kmath.functions.value +import kscience.kmath.operations.Ring +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.asBuffer public fun interface Interpolator { public fun interpolate(points: XYPointSet): (X) -> Y diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/LinearInterpolator.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/LinearInterpolator.kt similarity index 76% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/LinearInterpolator.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/LinearInterpolator.kt index 4fac86693..377aa1fbe 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/LinearInterpolator.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/LinearInterpolator.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.interpolation +package kscience.kmath.interpolation -import scientifik.kmath.functions.OrderedPiecewisePolynomial -import scientifik.kmath.functions.PiecewisePolynomial -import scientifik.kmath.functions.Polynomial -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.invoke +import kscience.kmath.functions.OrderedPiecewisePolynomial +import kscience.kmath.functions.PiecewisePolynomial +import kscience.kmath.functions.Polynomial +import kscience.kmath.operations.Field +import kscience.kmath.operations.invoke /** * Reference JVM implementation: https://github.com/apache/commons-math/blob/master/src/main/java/org/apache/commons/math4/analysis/interpolation/LinearInterpolator.java diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/LoessInterpolator.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/LoessInterpolator.kt similarity index 98% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/LoessInterpolator.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/LoessInterpolator.kt index 6707bd8bc..6931857b1 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/LoessInterpolator.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/LoessInterpolator.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.interpolation +package kscience.kmath.interpolation // -//import scientifik.kmath.functions.PiecewisePolynomial -//import scientifik.kmath.operations.Ring -//import scientifik.kmath.structures.Buffer +//import kscience.kmath.functions.PiecewisePolynomial +//import kscience.kmath.operations.Ring +//import kscience.kmath.structures.Buffer //import kotlin.math.abs //import kotlin.math.sqrt // diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/SplineInterpolator.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/SplineInterpolator.kt similarity index 86% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/SplineInterpolator.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/SplineInterpolator.kt index e5dd8906b..6cda45f72 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/SplineInterpolator.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/SplineInterpolator.kt @@ -1,11 +1,11 @@ -package scientifik.kmath.interpolation +package kscience.kmath.interpolation -import scientifik.kmath.functions.OrderedPiecewisePolynomial -import scientifik.kmath.functions.PiecewisePolynomial -import scientifik.kmath.functions.Polynomial -import scientifik.kmath.operations.Field -import scientifik.kmath.operations.invoke -import scientifik.kmath.structures.MutableBufferFactory +import kscience.kmath.functions.OrderedPiecewisePolynomial +import kscience.kmath.functions.PiecewisePolynomial +import kscience.kmath.functions.Polynomial +import kscience.kmath.operations.Field +import kscience.kmath.operations.invoke +import kscience.kmath.structures.MutableBufferFactory /** * Generic spline interpolator. Not recommended for performance critical places, use platform-specific and type specific ones. diff --git a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/XYPointSet.kt b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/XYPointSet.kt similarity index 92% rename from kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/XYPointSet.kt rename to kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/XYPointSet.kt index 3c45223d9..2abb7742c 100644 --- a/kmath-functions/src/commonMain/kotlin/scientifik/kmath/interpolation/XYPointSet.kt +++ b/kmath-functions/src/commonMain/kotlin/kscience/kmath/interpolation/XYPointSet.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.interpolation +package kscience.kmath.interpolation -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.Structure2D +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.Structure2D public interface XYPointSet { public val size: Int diff --git a/kmath-functions/src/commonTest/kotlin/scientifik/kmath/interpolation/LinearInterpolatorTest.kt b/kmath-functions/src/commonTest/kotlin/kscience/kmath/interpolation/LinearInterpolatorTest.kt similarity index 77% rename from kmath-functions/src/commonTest/kotlin/scientifik/kmath/interpolation/LinearInterpolatorTest.kt rename to kmath-functions/src/commonTest/kotlin/kscience/kmath/interpolation/LinearInterpolatorTest.kt index 3d39de4c9..303615676 100644 --- a/kmath-functions/src/commonTest/kotlin/scientifik/kmath/interpolation/LinearInterpolatorTest.kt +++ b/kmath-functions/src/commonTest/kotlin/kscience/kmath/interpolation/LinearInterpolatorTest.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.interpolation +package kscience.kmath.interpolation -import scientifik.kmath.functions.PiecewisePolynomial -import scientifik.kmath.functions.asFunction -import scientifik.kmath.operations.RealField +import kscience.kmath.functions.PiecewisePolynomial +import kscience.kmath.functions.asFunction +import kscience.kmath.operations.RealField import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Euclidean2DSpace.kt b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Euclidean2DSpace.kt similarity index 90% rename from kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Euclidean2DSpace.kt rename to kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Euclidean2DSpace.kt index a5318b709..c2a883a64 100644 --- a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Euclidean2DSpace.kt +++ b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Euclidean2DSpace.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.geometry +package kscience.kmath.geometry -import scientifik.kmath.linear.Point -import scientifik.kmath.operations.SpaceElement -import scientifik.kmath.operations.invoke +import kscience.kmath.linear.Point +import kscience.kmath.operations.SpaceElement +import kscience.kmath.operations.invoke import kotlin.math.sqrt public interface Vector2D : Point, Vector, SpaceElement { diff --git a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Euclidean3DSpace.kt b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Euclidean3DSpace.kt similarity index 91% rename from kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Euclidean3DSpace.kt rename to kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Euclidean3DSpace.kt index f695c0f64..e0052d791 100644 --- a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Euclidean3DSpace.kt +++ b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Euclidean3DSpace.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.geometry +package kscience.kmath.geometry -import scientifik.kmath.linear.Point -import scientifik.kmath.operations.SpaceElement -import scientifik.kmath.operations.invoke +import kscience.kmath.linear.Point +import kscience.kmath.operations.SpaceElement +import kscience.kmath.operations.invoke import kotlin.math.sqrt public interface Vector3D : Point, Vector, SpaceElement { diff --git a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/GeometrySpace.kt b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/GeometrySpace.kt similarity index 76% rename from kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/GeometrySpace.kt rename to kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/GeometrySpace.kt index 6798a6291..64badacf5 100644 --- a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/GeometrySpace.kt +++ b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/GeometrySpace.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.geometry +package kscience.kmath.geometry -import scientifik.kmath.operations.Space +import kscience.kmath.operations.Space public interface Vector diff --git a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Line.kt b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Line.kt similarity index 81% rename from kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Line.kt rename to kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Line.kt index a529f7f1b..ec2ce31ca 100644 --- a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/Line.kt +++ b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/Line.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.geometry +package kscience.kmath.geometry public data class Line(val base: V, val direction: V) diff --git a/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/ReferenceFrame.kt b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/ReferenceFrame.kt new file mode 100644 index 000000000..f9de7b51f --- /dev/null +++ b/kmath-geometry/src/commonMain/kotlin/kscience/kmath/geometry/ReferenceFrame.kt @@ -0,0 +1,3 @@ +package kscience.kmath.geometry + +public interface ReferenceFrame diff --git a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/ReferenceFrame.kt b/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/ReferenceFrame.kt deleted file mode 100644 index 49bf3793c..000000000 --- a/kmath-geometry/src/commonMain/kotlin/scientifik/kmath/geometry/ReferenceFrame.kt +++ /dev/null @@ -1,3 +0,0 @@ -package scientifik.kmath.geometry - -public interface ReferenceFrame diff --git a/kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/Counters.kt b/kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/Counters.kt similarity index 91% rename from kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/Counters.kt rename to kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/Counters.kt index ede6db5cf..7a263a9fc 100644 --- a/kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/Counters.kt +++ b/kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/Counters.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.histogram +package kscience.kmath.histogram /* * Common representation for atomic counters diff --git a/kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/Histogram.kt b/kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/Histogram.kt similarity index 87% rename from kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/Histogram.kt rename to kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/Histogram.kt index 4ecd62809..98300dada 100644 --- a/kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/Histogram.kt +++ b/kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/Histogram.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.histogram +package kscience.kmath.histogram -import scientifik.kmath.domains.Domain -import scientifik.kmath.linear.Point -import scientifik.kmath.structures.ArrayBuffer -import scientifik.kmath.structures.RealBuffer +import kscience.kmath.domains.Domain +import kscience.kmath.linear.Point +import kscience.kmath.structures.ArrayBuffer +import kscience.kmath.structures.RealBuffer /** * The bin in the histogram. The histogram is by definition always done in the real space diff --git a/kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/RealHistogram.kt b/kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/RealHistogram.kt similarity index 95% rename from kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/RealHistogram.kt rename to kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/RealHistogram.kt index 64ddc5515..c58952ab4 100644 --- a/kmath-histograms/src/commonMain/kotlin/scientifik/kmath/histogram/RealHistogram.kt +++ b/kmath-histograms/src/commonMain/kotlin/kscience/kmath/histogram/RealHistogram.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.histogram +package kscience.kmath.histogram -import scientifik.kmath.linear.Point -import scientifik.kmath.operations.SpaceOperations -import scientifik.kmath.operations.invoke -import scientifik.kmath.real.asVector -import scientifik.kmath.structures.* +import kscience.kmath.linear.Point +import kscience.kmath.operations.SpaceOperations +import kscience.kmath.operations.invoke +import kscience.kmath.real.asVector +import kscience.kmath.structures.* import kotlin.math.floor public data class BinDef>( diff --git a/kmath-histograms/src/commonTest/kotlin/scietifik/kmath/histogram/MultivariateHistogramTest.kt b/kmath-histograms/src/commonTest/kotlin/scietifik/kmath/histogram/MultivariateHistogramTest.kt index 4400da7c9..87292f17e 100644 --- a/kmath-histograms/src/commonTest/kotlin/scietifik/kmath/histogram/MultivariateHistogramTest.kt +++ b/kmath-histograms/src/commonTest/kotlin/scietifik/kmath/histogram/MultivariateHistogramTest.kt @@ -1,9 +1,9 @@ package scietifik.kmath.histogram -import scientifik.kmath.histogram.RealHistogram -import scientifik.kmath.histogram.fill -import scientifik.kmath.histogram.put -import scientifik.kmath.real.RealVector +import kscience.kmath.histogram.RealHistogram +import kscience.kmath.histogram.fill +import kscience.kmath.histogram.put +import kscience.kmath.real.RealVector import kotlin.random.Random import kotlin.test.Test import kotlin.test.assertEquals diff --git a/kmath-histograms/src/jsMain/kotlin/scientifik/kmath/histogram/Counters.kt b/kmath-histograms/src/jsMain/kotlin/kscience/kmath/histogram/Counters.kt similarity index 94% rename from kmath-histograms/src/jsMain/kotlin/scientifik/kmath/histogram/Counters.kt rename to kmath-histograms/src/jsMain/kotlin/kscience/kmath/histogram/Counters.kt index 8e2e946f4..d0fa1f4c2 100644 --- a/kmath-histograms/src/jsMain/kotlin/scientifik/kmath/histogram/Counters.kt +++ b/kmath-histograms/src/jsMain/kotlin/kscience/kmath/histogram/Counters.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.histogram +package kscience.kmath.histogram public actual class LongCounter { private var sum: Long = 0L diff --git a/kmath-histograms/src/jvmMain/kotlin/scientifik/kmath/histogram/Counters.kt b/kmath-histograms/src/jvmMain/kotlin/kscience/kmath/histogram/Counters.kt similarity index 84% rename from kmath-histograms/src/jvmMain/kotlin/scientifik/kmath/histogram/Counters.kt rename to kmath-histograms/src/jvmMain/kotlin/kscience/kmath/histogram/Counters.kt index dcf3d5491..efbd185ef 100644 --- a/kmath-histograms/src/jvmMain/kotlin/scientifik/kmath/histogram/Counters.kt +++ b/kmath-histograms/src/jvmMain/kotlin/kscience/kmath/histogram/Counters.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.histogram +package kscience.kmath.histogram import java.util.concurrent.atomic.DoubleAdder import java.util.concurrent.atomic.LongAdder diff --git a/kmath-histograms/src/jvmMain/kotlin/scientifik/kmath/histogram/UnivariateHistogram.kt b/kmath-histograms/src/jvmMain/kotlin/kscience/kmath/histogram/UnivariateHistogram.kt similarity index 95% rename from kmath-histograms/src/jvmMain/kotlin/scientifik/kmath/histogram/UnivariateHistogram.kt rename to kmath-histograms/src/jvmMain/kotlin/kscience/kmath/histogram/UnivariateHistogram.kt index add01d82c..5fada1302 100644 --- a/kmath-histograms/src/jvmMain/kotlin/scientifik/kmath/histogram/UnivariateHistogram.kt +++ b/kmath-histograms/src/jvmMain/kotlin/kscience/kmath/histogram/UnivariateHistogram.kt @@ -1,8 +1,8 @@ -package scientifik.kmath.histogram +package kscience.kmath.histogram -import scientifik.kmath.real.RealVector -import scientifik.kmath.real.asVector -import scientifik.kmath.structures.Buffer +import kscience.kmath.real.RealVector +import kscience.kmath.real.asVector +import kscience.kmath.structures.Buffer import java.util.* import kotlin.math.floor diff --git a/kmath-memory/src/commonMain/kotlin/scientifik/memory/Memory.kt b/kmath-memory/src/commonMain/kotlin/scientifik/memory/Memory.kt index 9b6eb0435..8de9a7a0c 100644 --- a/kmath-memory/src/commonMain/kotlin/scientifik/memory/Memory.kt +++ b/kmath-memory/src/commonMain/kotlin/scientifik/memory/Memory.kt @@ -1,4 +1,4 @@ -package scientifik.memory +package kscience.memory import kotlin.contracts.InvocationKind import kotlin.contracts.contract diff --git a/kmath-memory/src/commonMain/kotlin/scientifik/memory/MemorySpec.kt b/kmath-memory/src/commonMain/kotlin/scientifik/memory/MemorySpec.kt index 5bb163bc1..d2cbb32fd 100644 --- a/kmath-memory/src/commonMain/kotlin/scientifik/memory/MemorySpec.kt +++ b/kmath-memory/src/commonMain/kotlin/scientifik/memory/MemorySpec.kt @@ -1,4 +1,4 @@ -package scientifik.memory +package kscience.memory /** * A specification to read or write custom objects with fixed size in bytes. diff --git a/kmath-memory/src/jsMain/kotlin/scientifik/memory/DataViewMemory.kt b/kmath-memory/src/jsMain/kotlin/scientifik/memory/DataViewMemory.kt index 452ef1fea..d6b8841e4 100644 --- a/kmath-memory/src/jsMain/kotlin/scientifik/memory/DataViewMemory.kt +++ b/kmath-memory/src/jsMain/kotlin/scientifik/memory/DataViewMemory.kt @@ -1,4 +1,4 @@ -package scientifik.memory +package kscience.memory import org.khronos.webgl.ArrayBuffer import org.khronos.webgl.DataView diff --git a/kmath-memory/src/jvmMain/kotlin/scientifik/memory/ByteBufferMemory.kt b/kmath-memory/src/jvmMain/kotlin/scientifik/memory/ByteBufferMemory.kt index 0e7c49c74..c912b28ff 100644 --- a/kmath-memory/src/jvmMain/kotlin/scientifik/memory/ByteBufferMemory.kt +++ b/kmath-memory/src/jvmMain/kotlin/scientifik/memory/ByteBufferMemory.kt @@ -1,4 +1,4 @@ -package scientifik.memory +package kscience.memory import java.io.IOException import java.nio.ByteBuffer diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/Distribution.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/Distribution.kt similarity index 90% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/Distribution.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/Distribution.kt index 3c4d0420f..d55a52f56 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/Distribution.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/Distribution.kt @@ -1,9 +1,9 @@ -package scientifik.kmath.prob +package kscience.kmath.prob -import scientifik.kmath.chains.Chain -import scientifik.kmath.chains.collect -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.BufferFactory +import kscience.kmath.chains.Chain +import kscience.kmath.chains.collect +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.BufferFactory public interface Sampler { public fun sample(generator: RandomGenerator): Chain diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/FactorizedDistribution.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/FactorizedDistribution.kt similarity index 93% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/FactorizedDistribution.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/FactorizedDistribution.kt index 05b62deb8..4d713fc4e 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/FactorizedDistribution.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/FactorizedDistribution.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.prob +package kscience.kmath.prob -import scientifik.kmath.chains.Chain -import scientifik.kmath.chains.SimpleChain +import kscience.kmath.chains.Chain +import kscience.kmath.chains.SimpleChain /** * A multivariate distribution which takes a map of parameters diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/RandomChain.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/RandomChain.kt similarity index 87% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/RandomChain.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/RandomChain.kt index 4fc7fe241..b4a80f6c5 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/RandomChain.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/RandomChain.kt @@ -1,6 +1,6 @@ -package scientifik.kmath.prob +package kscience.kmath.prob -import scientifik.kmath.chains.Chain +import kscience.kmath.chains.Chain /** * A possibly stateful chain producing random values. diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/RandomGenerator.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/RandomGenerator.kt similarity index 98% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/RandomGenerator.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/RandomGenerator.kt index ecf9beeb1..0d95d6f97 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/RandomGenerator.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/RandomGenerator.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.prob +package kscience.kmath.prob import kotlin.random.Random diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/SamplerAlgebra.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/SamplerAlgebra.kt similarity index 79% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/SamplerAlgebra.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/SamplerAlgebra.kt index 184665928..e363ba30b 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/SamplerAlgebra.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/SamplerAlgebra.kt @@ -1,11 +1,11 @@ -package scientifik.kmath.prob +package kscience.kmath.prob -import scientifik.kmath.chains.Chain -import scientifik.kmath.chains.ConstantChain -import scientifik.kmath.chains.map -import scientifik.kmath.chains.zip -import scientifik.kmath.operations.Space -import scientifik.kmath.operations.invoke +import kscience.kmath.chains.Chain +import kscience.kmath.chains.ConstantChain +import kscience.kmath.chains.map +import kscience.kmath.chains.zip +import kscience.kmath.operations.Space +import kscience.kmath.operations.invoke public class BasicSampler(public val chainBuilder: (RandomGenerator) -> Chain) : Sampler { public override fun sample(generator: RandomGenerator): Chain = chainBuilder(generator) diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/Statistic.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/Statistic.kt similarity index 92% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/Statistic.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/Statistic.kt index 7811b88f6..6720a3d7f 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/Statistic.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/Statistic.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.prob +package kscience.kmath.prob import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers @@ -7,11 +7,11 @@ import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.runningReduce -import scientifik.kmath.coroutines.mapParallel -import scientifik.kmath.operations.* -import scientifik.kmath.structures.Buffer -import scientifik.kmath.structures.asIterable -import scientifik.kmath.structures.asSequence +import kscience.kmath.coroutines.mapParallel +import kscience.kmath.operations.* +import kscience.kmath.structures.Buffer +import kscience.kmath.structures.asIterable +import kscience.kmath.structures.asSequence /** * A function, that transforms a buffer of random quantities to some resulting value diff --git a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/UniformDistribution.kt b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/UniformDistribution.kt similarity index 87% rename from kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/UniformDistribution.kt rename to kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/UniformDistribution.kt index 10445219d..8df2c01e1 100644 --- a/kmath-prob/src/commonMain/kotlin/scientifik/kmath/prob/UniformDistribution.kt +++ b/kmath-prob/src/commonMain/kotlin/kscience/kmath/prob/UniformDistribution.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.prob +package kscience.kmath.prob -import scientifik.kmath.chains.Chain -import scientifik.kmath.chains.SimpleChain +import kscience.kmath.chains.Chain +import kscience.kmath.chains.SimpleChain public class UniformDistribution(public val range: ClosedFloatingPointRange) : UnivariateDistribution { private val length: Double = range.endInclusive - range.start diff --git a/kmath-prob/src/jvmMain/kotlin/scientifik/kmath/prob/RandomSourceGenerator.kt b/kmath-prob/src/jvmMain/kotlin/kscience/kmath/prob/RandomSourceGenerator.kt similarity index 98% rename from kmath-prob/src/jvmMain/kotlin/scientifik/kmath/prob/RandomSourceGenerator.kt rename to kmath-prob/src/jvmMain/kotlin/kscience/kmath/prob/RandomSourceGenerator.kt index eda36415a..18be6f019 100644 --- a/kmath-prob/src/jvmMain/kotlin/scientifik/kmath/prob/RandomSourceGenerator.kt +++ b/kmath-prob/src/jvmMain/kotlin/kscience/kmath/prob/RandomSourceGenerator.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.prob +package kscience.kmath.prob import org.apache.commons.rng.UniformRandomProvider import org.apache.commons.rng.simple.RandomSource diff --git a/kmath-prob/src/jvmMain/kotlin/scientifik/kmath/prob/distributions.kt b/kmath-prob/src/jvmMain/kotlin/kscience/kmath/prob/distributions.kt similarity index 95% rename from kmath-prob/src/jvmMain/kotlin/scientifik/kmath/prob/distributions.kt rename to kmath-prob/src/jvmMain/kotlin/kscience/kmath/prob/distributions.kt index 923317ed2..ff20572cc 100644 --- a/kmath-prob/src/jvmMain/kotlin/scientifik/kmath/prob/distributions.kt +++ b/kmath-prob/src/jvmMain/kotlin/kscience/kmath/prob/distributions.kt @@ -1,11 +1,10 @@ -package scientifik.kmath.prob +package kscience.kmath.prob +import kscience.kmath.chains.BlockingIntChain +import kscience.kmath.chains.BlockingRealChain +import kscience.kmath.chains.Chain import org.apache.commons.rng.UniformRandomProvider import org.apache.commons.rng.sampling.distribution.* -import scientifik.kmath.chains.BlockingIntChain -import scientifik.kmath.chains.BlockingRealChain -import scientifik.kmath.chains.Chain -import java.util.* import kotlin.math.PI import kotlin.math.exp import kotlin.math.pow diff --git a/kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/CommonsDistributionsTest.kt b/kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/CommonsDistributionsTest.kt similarity index 96% rename from kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/CommonsDistributionsTest.kt rename to kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/CommonsDistributionsTest.kt index 0680083ce..12a00684b 100644 --- a/kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/CommonsDistributionsTest.kt +++ b/kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/CommonsDistributionsTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.prob +package kscience.kmath.prob import kotlinx.coroutines.flow.take import kotlinx.coroutines.flow.toList diff --git a/kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/SamplerTest.kt b/kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/SamplerTest.kt similarity index 92% rename from kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/SamplerTest.kt rename to kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/SamplerTest.kt index 1152f3057..3d8a4f531 100644 --- a/kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/SamplerTest.kt +++ b/kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/SamplerTest.kt @@ -1,4 +1,4 @@ -package scientifik.kmath.prob +package kscience.kmath.prob import kotlinx.coroutines.runBlocking import kotlin.test.Test diff --git a/kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/StatisticTest.kt b/kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/StatisticTest.kt similarity index 91% rename from kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/StatisticTest.kt rename to kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/StatisticTest.kt index 30789a004..22ca472a8 100644 --- a/kmath-prob/src/jvmTest/kotlin/scientifik/kmath/prob/StatisticTest.kt +++ b/kmath-prob/src/jvmTest/kotlin/kscience/kmath/prob/StatisticTest.kt @@ -1,10 +1,10 @@ -package scientifik.kmath.prob +package kscience.kmath.prob import kotlinx.coroutines.flow.drop import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking -import scientifik.kmath.streaming.chunked +import kscience.kmath.streaming.chunked import kotlin.test.Test internal class StatisticTest { diff --git a/kmath-viktor/src/main/kotlin/scientifik/kmath/viktor/ViktorBuffer.kt b/kmath-viktor/src/main/kotlin/kscience/kmath/viktor/ViktorBuffer.kt similarity index 88% rename from kmath-viktor/src/main/kotlin/scientifik/kmath/viktor/ViktorBuffer.kt rename to kmath-viktor/src/main/kotlin/kscience/kmath/viktor/ViktorBuffer.kt index 97ab9e6d7..5c9611758 100644 --- a/kmath-viktor/src/main/kotlin/scientifik/kmath/viktor/ViktorBuffer.kt +++ b/kmath-viktor/src/main/kotlin/kscience/kmath/viktor/ViktorBuffer.kt @@ -1,7 +1,7 @@ -package scientifik.kmath.viktor +package kscience.kmath.viktor +import kscience.kmath.structures.MutableBuffer import org.jetbrains.bio.viktor.F64FlatArray -import scientifik.kmath.structures.MutableBuffer @Suppress("NOTHING_TO_INLINE", "OVERRIDE_BY_INLINE") public inline class ViktorBuffer(public val flatArray: F64FlatArray) : MutableBuffer { diff --git a/kmath-viktor/src/main/kotlin/scientifik/kmath/viktor/ViktorNDStructure.kt b/kmath-viktor/src/main/kotlin/kscience/kmath/viktor/ViktorNDStructure.kt similarity index 92% rename from kmath-viktor/src/main/kotlin/scientifik/kmath/viktor/ViktorNDStructure.kt rename to kmath-viktor/src/main/kotlin/kscience/kmath/viktor/ViktorNDStructure.kt index cbd5357af..2471362cb 100644 --- a/kmath-viktor/src/main/kotlin/scientifik/kmath/viktor/ViktorNDStructure.kt +++ b/kmath-viktor/src/main/kotlin/kscience/kmath/viktor/ViktorNDStructure.kt @@ -1,11 +1,11 @@ -package scientifik.kmath.viktor +package kscience.kmath.viktor +import kscience.kmath.operations.RealField +import kscience.kmath.structures.DefaultStrides +import kscience.kmath.structures.MutableNDStructure +import kscience.kmath.structures.NDField +import kscience.kmath.structures.Strides import org.jetbrains.bio.viktor.F64Array -import scientifik.kmath.operations.RealField -import scientifik.kmath.structures.DefaultStrides -import scientifik.kmath.structures.MutableNDStructure -import scientifik.kmath.structures.NDField -import scientifik.kmath.structures.Strides @Suppress("OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") public inline class ViktorNDStructure(public val f64Buffer: F64Array) : MutableNDStructure { diff --git a/settings.gradle.kts b/settings.gradle.kts index 666a05e45..c0d729c32 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,7 +15,7 @@ pluginManagement { jcenter() gradlePluginPortal() maven("https://dl.bintray.com/kotlin/kotlin-eap") - maven("https://dl.bintray.com/mipt-npm/scientifik") + maven("https://dl.bintray.com/mipt-npm/kscience") maven("https://dl.bintray.com/mipt-npm/dev") maven("https://dl.bintray.com/kotlin/kotlinx") maven("https://dl.bintray.com/kotlin/kotlin-dev/")