MutableBufferND

class MutableBufferND<T>(strides: Strides, mutableBuffer: MutableBuffer<T>) : BufferND<T> , MutableStructureND<T>

Represents MutableStructureND over MutableBuffer.

Parameters

T

the type of items.

strides

The strides to access elements of MutableBuffer by linear indices.

mutableBuffer

The underlying buffer.

Constructors

MutableBufferND
Link copied to clipboard
common
fun <T> MutableBufferND(strides: Strides, mutableBuffer: MutableBuffer<T>)
the type of items.

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.
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 override fun <F : StructureFeature> getFeature(type: KClass<out F>): F?
Feature is some additional structure information that allows to access it special properties or hints.
set
Link copied to clipboard
common
open operator override fun set(index: IntArray, value: T)
Inserts an item at the specified indices.

Properties

buffer
Link copied to clipboard
common
val buffer: Buffer<T>
The underlying buffer.
dimension
Link copied to clipboard
common
open val dimension: Int
The count of dimensions in this structure.
mutableBuffer
Link copied to clipboard
common
val mutableBuffer: MutableBuffer<T>
The underlying buffer.
shape
Link copied to clipboard
common
abstract val shape: IntArray
The shape of structure i.e., non-empty sequence of non-negative integers that specify sizes of dimensions of this structure.
strides
Link copied to clipboard
common
val strides: Strides
The strides to access elements of Buffer by linear indices.

Sources

common source
Link copied to clipboard