Deploy fixes for 0.2.0-dev-5
This commit is contained in:
parent
881b85a1d9
commit
d10ae66e58
@ -92,7 +92,7 @@ public interface Algebra<T> {
|
||||
* Call a block with an [Algebra] as receiver.
|
||||
*/
|
||||
// TODO add contract when KT-32313 is fixed
|
||||
public inline operator fun <A : Algebra<*>, R> A.invoke(block: A.() -> R): R = block()
|
||||
public inline operator fun <A : Algebra<*>, R> A.invoke(block: A.() -> R): R = run(block)
|
||||
|
||||
/**
|
||||
* Represents "semispace", i.e. algebraic structure with associative binary operation called "addition" as well as
|
||||
|
@ -4,6 +4,7 @@ import kscience.kmath.linear.DeterminantFeature
|
||||
import kscience.kmath.linear.LupDecompositionFeature
|
||||
import kscience.kmath.linear.MatrixFeature
|
||||
import kscience.kmath.linear.plus
|
||||
import kscience.kmath.misc.UnstableKMathAPI
|
||||
import kscience.kmath.structures.getFeature
|
||||
import org.ejml.dense.row.factory.DecompositionFactory_DDRM
|
||||
import org.ejml.simple.SimpleMatrix
|
||||
@ -39,6 +40,7 @@ internal class EjmlMatrixTest {
|
||||
assertEquals(listOf(m.numRows(), m.numCols()), w.shape.toList())
|
||||
}
|
||||
|
||||
@OptIn(UnstableKMathAPI::class)
|
||||
@Test
|
||||
fun features() {
|
||||
val m = randomMatrix
|
||||
@ -57,6 +59,7 @@ internal class EjmlMatrixTest {
|
||||
|
||||
private object SomeFeature : MatrixFeature {}
|
||||
|
||||
@OptIn(UnstableKMathAPI::class)
|
||||
@Test
|
||||
fun suggestFeature() {
|
||||
assertNotNull((EjmlMatrix(randomMatrix) + SomeFeature).getFeature<SomeFeature>())
|
||||
|
@ -62,6 +62,7 @@ class MCScopeTest {
|
||||
}
|
||||
|
||||
|
||||
@OptIn(ObsoleteCoroutinesApi::class)
|
||||
fun compareResult(test: ATest) {
|
||||
val res1 = runBlocking(Dispatchers.Default) { test() }
|
||||
val res2 = runBlocking(newSingleThreadContext("test")) { test() }
|
||||
|
Loading…
Reference in New Issue
Block a user