From d8ef190ed8912476aaf7901431cc7e24d6449d94 Mon Sep 17 00:00:00 2001 From: Roland Grinis Date: Sun, 21 Mar 2021 08:07:17 +0000 Subject: [PATCH] UnaryPlus fails API check --- .../kotlin/space/kscience/kmath/nd/StructureND.kt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/StructureND.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/StructureND.kt index f28d29e47..78eac1809 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/StructureND.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/StructureND.kt @@ -189,11 +189,6 @@ public interface Strides { */ public fun index(offset: Int): IntArray - /** - * Get next multidimensional index from the current multidimensional index - */ - public fun nextIndex(index: IntArray): IntArray - /** * The size of linear buffer to accommodate all elements of ND-structure corresponding to strides */ @@ -232,7 +227,7 @@ public class DefaultStrides private constructor(override val shape: IntArray) : } override fun offset(index: IntArray): Int = index.mapIndexed { i, value -> - if (value < 0 || value >= shape[i]) throw IndexOutOfBoundsException("Index $value out of shape bounds: (0,${shape[i]})") + if (value < 0 || value >= shape[i]) throw IndexOutOfBoundsException("Index $value out of shape bounds: (0,${this.shape[i]})") value * strides[i] }.sum() @@ -250,10 +245,6 @@ public class DefaultStrides private constructor(override val shape: IntArray) : return res } - override fun nextIndex(index: IntArray): IntArray { - TODO("Not yet implemented") - } - override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is DefaultStrides) return false @@ -275,7 +266,6 @@ public class DefaultStrides private constructor(override val shape: IntArray) : } } - public inline fun StructureND.combine( struct: StructureND, crossinline block: (T, T) -> T,