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

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.
structureND
Link copied to clipboard
common
abstract fun structureND(shape: Shape, initializer: C.(IntArray) -> T): StructureND<T>
Produces a new StructureND using given initializer function.
zip
Link copied to clipboard
common
abstract fun zip(left: StructureND<T>, right: StructureND<T>, transform: C.(T, T) -> T): StructureND<T>
Combines two structures into one.

Properties

elementAlgebra
Link copied to clipboard
common
abstract val elementAlgebra: C
The algebra over elements of ND structure.

Inheritors

GroupOpsND
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.
one
Link copied to clipboard
common
fun <T, A : Ring<T>> AlgebraND<T, A>.one(shape: Shape): StructureND<T>
@JvmName(name = oneVarArg)
fun <T, A : Ring<T>> AlgebraND<T, A>.one(shapeFirst: Int, vararg shapeRest: Int): StructureND<T>
structureND
Link copied to clipboard
common
fun <T, A : Algebra<T>> AlgebraND<T, A>.structureND(shapeFirst: Int, vararg shapeRest: Int, initializer: A.(IntArray) -> T): StructureND<T>
zero
Link copied to clipboard
common
fun <T, A : Group<T>> AlgebraND<T, A>.zero(shape: Shape): StructureND<T>
@JvmName(name = zeroVarArg)
fun <T, A : Group<T>> AlgebraND<T, A>.zero(shapeFirst: Int, vararg shapeRest: Int): StructureND<T>

Sources

common source
Link copied to clipboard