Structure2D

interface Structure2D<out T> : StructureND<T>

A structure that is guaranteed to be two-dimensional.

Parameters

T

the type of items.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

elements
Link copied to clipboard
common
open override 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(i: Int, j: Int): T
Retrieves an element from the structure by two 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.

Properties

colNum
Link copied to clipboard
common
abstract val colNum: Int
The number of columns in this structure.
columns
Link copied to clipboard
common
open val columns: List<Buffer<T>>
The buffer of columns of this structure.
dimension
Link copied to clipboard
common
open val dimension: Int
The count of dimensions in this structure.
rowNum
Link copied to clipboard
common
abstract val rowNum: Int
The number of rows in this structure.
rows
Link copied to clipboard
common
open val rows: List<Buffer<T>>
The buffer of rows of this structure.
shape
Link copied to clipboard
common
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

MatrixWrapper
Link copied to clipboard
VirtualMatrix
Link copied to clipboard
MutableStructure2D
Link copied to clipboard

Extensions

asColumnarData
Link copied to clipboard
common
fun <T> Structure2D<T>.asColumnarData(mapping: Map<Symbol, Int>): ColumnarData<T>
A zero-copy method to represent a Structure2D as a two-column x-y data.
asXYData
Link copied to clipboard
common
fun <T> Structure2D<T>.asXYData(xIndex: Int = 0, yIndex: Int = 1): XYColumnarData<T, T, T>
A zero-copy method to represent a Structure2D as a two-column x-y data.

Sources

common source
Link copied to clipboard