File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
kmath-core/src/commonMain/kotlin/kscience/kmath/operations
kmath-ejml/src/test/kotlin/kscience/kmath/ejml
kmath-stat/src/jvmTest/kotlin/kscience/kmath/stat Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public interface Algebra<T> {
9292 * Call a block with an [Algebra] as receiver.
9393 */
9494// TODO add contract when KT-32313 is fixed
95- public inline operator fun <A : Algebra <* >, R > A.invoke (block : A .() -> R ): R = block( )
95+ public inline operator fun <A : Algebra <* >, R > A.invoke (block : A .() -> R ): R = run (block )
9696
9797/* *
9898 * Represents "semispace", i.e. algebraic structure with associative binary operation called "addition" as well as
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import kscience.kmath.linear.DeterminantFeature
44import kscience.kmath.linear.LupDecompositionFeature
55import kscience.kmath.linear.MatrixFeature
66import kscience.kmath.linear.plus
7+ import kscience.kmath.misc.UnstableKMathAPI
78import kscience.kmath.structures.getFeature
89import org.ejml.dense.row.factory.DecompositionFactory_DDRM
910import org.ejml.simple.SimpleMatrix
@@ -39,6 +40,7 @@ internal class EjmlMatrixTest {
3940 assertEquals(listOf (m.numRows(), m.numCols()), w.shape.toList())
4041 }
4142
43+ @OptIn(UnstableKMathAPI ::class )
4244 @Test
4345 fun features () {
4446 val m = randomMatrix
@@ -57,6 +59,7 @@ internal class EjmlMatrixTest {
5759
5860 private object SomeFeature : MatrixFeature {}
5961
62+ @OptIn(UnstableKMathAPI ::class )
6063 @Test
6164 fun suggestFeature () {
6265 assertNotNull((EjmlMatrix (randomMatrix) + SomeFeature ).getFeature<SomeFeature >())
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ class MCScopeTest {
6262 }
6363
6464
65+ @OptIn(ObsoleteCoroutinesApi ::class )
6566 fun compareResult (test : ATest ) {
6667 val res1 = runBlocking(Dispatchers .Default ) { test() }
6768 val res2 = runBlocking(newSingleThreadContext(" test" )) { test() }
You can’t perform that action at this time.
0 commit comments