Add verification of NDField

This commit is contained in:
Iaroslav Postovalov 2020-12-20 21:13:11 +07:00
parent c8df741a4e
commit 69b1952c15
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -1,10 +1,16 @@
package kscience.kmath.structures package kscience.kmath.structures
import kscience.kmath.operations.internal.FieldVerifier
import kscience.kmath.operations.invoke
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
internal class NDFieldTest {
@Test
fun verify() {
(NDField.real(12, 32)) { FieldVerifier(this, one + 3, one - 23, one * 12, 6.66) }
}
class NDFieldTest {
@Test @Test
fun testStrides() { fun testStrides() {
val ndArray = NDElement.real(intArrayOf(10, 10)) { (it[0] + it[1]).toDouble() } val ndArray = NDElement.real(intArrayOf(10, 10)) { (it[0] + it[1]).toDouble() }