MutableNDStructure

interface MutableNDStructure<T> : NDStructure<T>

Represents mutable NDStructure.

Functions

elements
Link copied to clipboard
common
abstract fun elements(): Sequence<Pair<IntArray, T>>
Returns the sequence of all the elements associated by their indices.
equals
Link copied to clipboard
common
abstract operator override fun equals(other: Any?): Boolean
get
Link copied to clipboard
common
abstract operator fun get(index: IntArray): T
Returns the value at the specified indices.
getFeature
Link copied to clipboard
common
open fun <T : Any> getFeature(type: KClass<T>): T?
Feature is additional property or hint that does not directly affect the structure, but could in some cases help optimize operations and performance.
hashCode
Link copied to clipboard
common
abstract override fun hashCode(): Int
set
Link copied to clipboard
common
abstract operator fun set(index: IntArray, value: T)
Inserts an item at the specified indices.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

dimension
Link copied to clipboard
common
open val dimension: Int
The count of dimensions in this structure.
shape
Link copied to clipboard
common
abstract val shape: IntArray
The shape of structure, i.e.

Inheritors

MutableNDBuffer
Link copied to clipboard

Extensions

mapInPlace
Link copied to clipboard
common
inline fun <T> MutableNDStructure<T>.mapInPlace(action: (IntArray, T) -> T)
Transform a structure element-by element in place.