v0.2.0 #206

Merged
altavir merged 210 commits from dev into master 2021-02-21 16:33:25 +03:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit 57328a176e - Show all commits

View File

@ -3,11 +3,17 @@ package kscience.kmath.gsl
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
internal class GslMatrixTest { internal class GslMatrixRealTest {
@Test @Test
fun dimensions() = GslRealMatrixContext { fun dimensions() = GslRealMatrixContext {
val mat = produce(42, 24) { _, _ -> 0.0 } val mat = produce(42, 24) { _, _ -> 0.0 }
assertEquals(42, mat.rowNum) assertEquals(42, mat.rowNum)
assertEquals(24, mat.colNum) assertEquals(24, mat.colNum)
} }
@Test
fun get() = GslRealMatrixContext {
val mat = produce(1, 1) { _, _ -> 42.0 }
assertEquals(42.0, mat[0, 0])
}
} }

View File

@ -12,7 +12,7 @@ import kotlin.test.assertEquals
import kotlin.test.assertTrue import kotlin.test.assertTrue
import kotlin.time.measureTime import kotlin.time.measureTime
internal class RealTest { internal class GslRealContextTest {
@Test @Test
fun testScale() = GslRealMatrixContext { fun testScale() = GslRealMatrixContext {
val ma = produce(10, 10) { _, _ -> 0.1 } val ma = produce(10, 10) { _, _ -> 0.1 }