BufferND

open class BufferND<out T>(indices: ShapeIndexer, buffer: Buffer<T>) : StructureND<T>

Represents StructureND over Buffer.

Parameters

T

the type of items.

indices

The strides to access elements of Buffer by linear indices.

buffer

The underlying buffer.

Constructors

Link copied to clipboard
fun <out T> BufferND(indices: ShapeIndexer, buffer: Buffer<T>)

Functions

Link copied to clipboard
open fun elements(): Sequence<Pair<IntArray, T>>

Returns the sequence of all the elements associated by their indices.

Link copied to clipboard
open operator override fun get(index: IntArray): T

Returns the value at the specified indices.

Link copied to clipboard
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. If the feature is not present, null is returned.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open val buffer: Buffer<T>
Link copied to clipboard
open val dimension: Int

The count of dimensions in this structure. It should be equal to size of shape.

Link copied to clipboard
open override val indices: ShapeIndexer
Link copied to clipboard
open override val shape: IntArray

The shape of structure i.e., non-empty sequence of non-negative integers that specify sizes of dimensions of this structure.

Inheritors

Link copied to clipboard
Link copied to clipboard

Sources

Link copied to clipboard