NDAlgebra

interface NDAlgebra<T, C>

The base interface for all ND-algebra implementations.

Parameters

T

the type of ND-structure element.

C

the type of the element context.

N

the type of the structure.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

combine
Link copied to clipboard
common
abstract fun combine(a: NDStructure<T>, b: NDStructure<T>, transform: C.(T, T) -> T): NDStructure<T>
Combines two structures into one.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
invoke
Link copied to clipboard
common
open operator fun (T) -> T.invoke(structure: NDStructure<T>): NDStructure<T>
Element-wise invocation of function working on T on a NDStructure.
map
Link copied to clipboard
common
abstract fun NDStructure<T>.map(transform: C.(T) -> T): NDStructure<T>
Maps elements from one structure to another one by applying transform to them.
mapIndexed
Link copied to clipboard
common
abstract fun NDStructure<T>.mapIndexed(transform: C.(index: IntArray, T) -> T): NDStructure<T>
Maps elements from one structure to another one by applying transform to them alongside with their indices.
produce
Link copied to clipboard
common
abstract fun produce(initializer: C.(IntArray) -> T): NDStructure<T>
Produces a new N structure using given initializer function.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

elementContext
Link copied to clipboard
common
abstract val elementContext: C
The algebra over elements of ND structure.
shape
Link copied to clipboard
common
abstract val shape: IntArray
The shape of ND-structures this algebra operates on.

Inheritors

BufferNDAlgebra
Link copied to clipboard
NDSpace
Link copied to clipboard