AlgebraND

interface AlgebraND<T, out C : Algebra<T>>

The base interface for all ND-algebra implementations.

Parameters

T

the type of ND-structure element.

C

the type of the element context.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

combine
Link copied to clipboard
common
abstract fun combine(a: StructureND<T>, b: StructureND<T>, transform: C.(T, T) -> T): StructureND<T>
Combines two structures into one.
getFeature
Link copied to clipboard
common
open fun <F : StructureFeature> getFeature(structure: StructureND<T>, type: KClass<out F>): F?
Get a feature of the structure in this scope.
invoke
Link copied to clipboard
common
open operator fun (T) -> T.invoke(structure: StructureND<T>): StructureND<T>
Element-wise invocation of function working on T on a StructureND.
map
Link copied to clipboard
common
abstract fun StructureND<T>.map(transform: C.(T) -> T): StructureND<T>
Maps elements from one structure to another one by applying transform to them.
mapIndexed
Link copied to clipboard
common
abstract fun StructureND<T>.mapIndexed(transform: C.(index: IntArray, T) -> T): StructureND<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): StructureND<T>
Produces a new NDStructure using given initializer function.

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

GroupND
Link copied to clipboard
BufferAlgebraND
Link copied to clipboard

Extensions

contentEquals
Link copied to clipboard
common
fun <T : Comparable<T>> AlgebraND<T, Ring<T>>.contentEquals(st1: StructureND<T>, st2: StructureND<T>): Boolean
Indicates whether some StructureND is equal to another one.
getFeature
Link copied to clipboard
common
inline fun <T : Any, F : StructureFeature> AlgebraND<T, *>.getFeature(structure: StructureND<T>): F?
Get a feature of the structure in this scope.

Sources

common source
Link copied to clipboard