diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/Structure2D.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/Structure2D.kt index 8e41110fe..e1a1d37de 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/Structure2D.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/Structure2D.kt @@ -75,14 +75,14 @@ public interface MutableStructure2D : Structure2D, MutableStructureND { /** * The buffer of rows of this structure. It gets elements from the structure dynamically. */ - override val rows: MutableList> - get() = MutableList(rowNum) { i -> MutableBuffer1DWrapper(VirtualMutableBuffer(colNum) { j -> get(i, j) })} + override val rows: List> + get() = List(rowNum) { i -> MutableBuffer1DWrapper(VirtualMutableBuffer(colNum) { j -> get(i, j) })} /** * The buffer of columns of this structure. It gets elements from the structure dynamically. */ - override val columns: MutableList> - get() = MutableList(colNum) { j -> MutableBuffer1DWrapper(VirtualMutableBuffer(rowNum) { i -> get(i, j) }) } + override val columns: List> + get() = List(colNum) { j -> MutableBuffer1DWrapper(VirtualMutableBuffer(rowNum) { i -> get(i, j) }) } } /**