MutableStructure1D

interface MutableStructure1D<T> : Structure1D<T> , MutableStructureND<T> , MutableBuffer<T>

A mutable structure that is guaranteed to be one-dimensional

Functions

copy
Link copied to clipboard
common
abstract fun copy(): MutableBuffer<T>
Returns a shallow copy of the buffer.
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
open operator override fun get(index: IntArray): T
Returns the value at the specified indices.
abstract operator fun get(index: Int): T
Gets element at given index.
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.
iterator
Link copied to clipboard
common
open operator override fun iterator(): Iterator<T>
Iterates over all elements.
set
Link copied to clipboard
common
open operator override fun set(index: IntArray, value: T)
Inserts an item at the specified indices.
abstract operator fun set(index: Int, value: T)
Sets the array element at the specified index to the specified value.

Properties

dimension
Link copied to clipboard
common
open override 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., non-empty sequence of non-negative integers that specify sizes of dimensions of this structure.
size
Link copied to clipboard
common
abstract val size: Int
The size of this buffer.

Sources

common source
Link copied to clipboard