diff --git a/kmath-ast/build.gradle.kts b/kmath-ast/build.gradle.kts index c60977862..7cdb745f0 100644 --- a/kmath-ast/build.gradle.kts +++ b/kmath-ast/build.gradle.kts @@ -46,7 +46,7 @@ kotlin { sourceSets { filter { it.name.contains("test", true) } .map(org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet::languageSettings) - .forEach { it.optIn("space.kscience.kmath.misc.UnstableKMathAPI") } + .forEach { it.optIn("space.kscience.kmath.UnstableKMathAPI") } } } diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/utils.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/utils.kt index c6b241e5c..f48f74ccd 100644 --- a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/utils.kt +++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/ast/utils.kt @@ -5,6 +5,7 @@ package space.kscience.kmath.ast +import space.kscience.kmath.UnstableKMathAPI import space.kscience.kmath.expressions.Expression import space.kscience.kmath.expressions.MST import space.kscience.kmath.expressions.Symbol @@ -17,6 +18,7 @@ import space.kscience.kmath.estree.compileToExpression as estreeCompileToExpress import space.kscience.kmath.wasm.compile as wasmCompile import space.kscience.kmath.wasm.compileToExpression as wasmCompileToExpression +@OptIn(UnstableKMathAPI::class) private object WasmCompilerTestContext : CompilerTestContext { override fun MST.compileToExpression(algebra: IntRing): Expression = wasmCompileToExpression(algebra) override fun MST.compile(algebra: IntRing, arguments: Map): Int = wasmCompile(algebra, arguments) diff --git a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt index 0a85d5f24..132f9f1bd 100644 --- a/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt +++ b/kmath-ast/src/jsTest/kotlin/space/kscience/kmath/wasm/TestWasmSpecific.kt @@ -5,6 +5,7 @@ package space.kscience.kmath.wasm +import space.kscience.kmath.UnstableKMathAPI import space.kscience.kmath.expressions.MstExtendedField import space.kscience.kmath.expressions.MstRing import space.kscience.kmath.expressions.invoke @@ -15,6 +16,7 @@ import space.kscience.kmath.operations.invoke import kotlin.test.Test import kotlin.test.assertEquals +@OptIn(UnstableKMathAPI::class) internal class TestWasmSpecific { @Test fun int() { diff --git a/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/Circle2D.kt b/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/Circle2D.kt index 1a4cb6734..202dab0c2 100644 --- a/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/Circle2D.kt +++ b/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/Circle2D.kt @@ -8,7 +8,7 @@ package space.kscience.kmath.geometry import kotlinx.serialization.Serializable import kotlin.math.PI -interface Circle +public interface Circle /** diff --git a/kmath-geometry/src/commonTest/kotlin/space/kscience/kmath/geometry/testUtils.kt b/kmath-geometry/src/commonTest/kotlin/space/kscience/kmath/geometry/testUtils.kt index 6796b291f..4c3bcc85e 100644 --- a/kmath-geometry/src/commonTest/kotlin/space/kscience/kmath/geometry/testUtils.kt +++ b/kmath-geometry/src/commonTest/kotlin/space/kscience/kmath/geometry/testUtils.kt @@ -36,7 +36,7 @@ fun assertVectorEquals(expected: DoubleVector3D, actual: DoubleVector3D, absolut assertEquals(expected.z, actual.z, absoluteTolerance) } -fun > GeometrySpace.isCollinear(a: V, b: V, absoluteTolerance: D = defaultPrecision): Boolean { +fun GeometrySpace.isCollinear(a: V, b: V, absoluteTolerance: Double = defaultPrecision): Boolean { val aDist = a.distanceTo(zero) val bDist = b.distanceTo(zero) return aDist < absoluteTolerance || bDist < absoluteTolerance || abs(abs((a dot b) / (aDist * bDist)) - 1) < absoluteTolerance diff --git a/kmath-geometry/src/jvmMain/kotlin/space/kscience/kmath/geometry/lineExtensions.kt b/kmath-geometry/src/jvmMain/kotlin/space/kscience/kmath/geometry/lineExtensions.kt index cf204f080..bec7e9799 100644 --- a/kmath-geometry/src/jvmMain/kotlin/space/kscience/kmath/geometry/lineExtensions.kt +++ b/kmath-geometry/src/jvmMain/kotlin/space/kscience/kmath/geometry/lineExtensions.kt @@ -12,10 +12,12 @@ import space.kscience.kmath.operations.Group * Get a line, containing this [LineSegment] */ context(Group) -public val LineSegment.line: Line get() = Line(begin, end - begin) +public val LineSegment.line: Line + get() = Line(begin, end - begin) /** * Get a length of a line segment */ -context(GeometrySpace) -public val LineSegment.length: Double get() = norm(end - begin) \ No newline at end of file +context(GeometrySpace) +public val > LineSegment.length: D + get() = norm(end - begin) \ No newline at end of file