NDField

interface NDField<T, F : Field<T>> : Field<NDStructure<T>> , NDRing<T, F>

Field of NDStructure.

Parameters

T

the type of the element contained in ND structure.

N

the type of ND structure.

F

the type field of structure elements.

Functions

add
Link copied to clipboard
common
abstract fun add(a: NDStructure<T>, b: NDStructure<T>): NDStructure<T>
Addition of two elements.
binaryOperation
Link copied to clipboard
common
open fun binaryOperation(operation: String, left: NDStructure<T>, right: NDStructure<T>): NDStructure<T>
Dynamically invokes a binary operation with the certain name.
binaryOperationFunction
Link copied to clipboard
common
open override fun binaryOperationFunction(operation: String): (left: NDStructure<T>, right: NDStructure<T>) -> NDStructure<T>
Dynamically dispatches a binary operation with the certain name.
bindSymbol
Link copied to clipboard
common
open fun bindSymbol(value: String): NDStructure<T>
Wraps a raw string to T object.
combine
Link copied to clipboard
common
abstract fun combine(a: NDStructure<T>, b: NDStructure<T>, transform: F.(T, T) -> T): NDStructure<T>
Combines two structures into one.
div
Link copied to clipboard
common
open operator fun T.div(arg: NDStructure<T>): NDStructure<T>
Divides an element by an ND structure of it.
open operator fun NDStructure<T>.div(arg: T): NDStructure<T>
Divides an ND structure by an element of it.
open operator fun Number.div(b: NDStructure<T>): NDStructure<T>
Division of element by scalar.
open operator fun NDStructure<T>.div(b: NDStructure<T>): NDStructure<T>
Division of two elements.
open operator fun NDStructure<T>.div(k: Number): NDStructure<T>
Division of this element by scalar.
divide
Link copied to clipboard
common
open override fun divide(a: NDStructure<T>, b: NDStructure<T>): NDStructure<T>
Element-wise division.
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: F.(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: F.(index: IntArray, T) -> T): NDStructure<T>
Maps elements from one structure to another one by applying transform to them alongside with their indices.
minus
Link copied to clipboard
common
open operator fun T.minus(arg: NDStructure<T>): NDStructure<T>
Subtracts an ND structure from an element of it.
open operator fun NDStructure<T>.minus(arg: T): NDStructure<T>
Subtracts an element from ND structure of it.
open operator fun NDStructure<T>.minus(b: NDStructure<T>): NDStructure<T>
Subtraction of two elements.
multiply
Link copied to clipboard
common
abstract fun multiply(a: NDStructure<T>, b: NDStructure<T>): NDStructure<T>
Multiplies two elements.
abstract fun multiply(a: NDStructure<T>, k: Number): NDStructure<T>
Multiplication of element by scalar.
plus
Link copied to clipboard
common
open operator fun T.plus(arg: NDStructure<T>): NDStructure<T>
Adds an element to ND structure of it.
open operator fun NDStructure<T>.plus(arg: T): NDStructure<T>
Adds an ND structure to an element of it.
open operator fun NDStructure<T>.plus(b: NDStructure<T>): NDStructure<T>
Addition of two elements.
produce
Link copied to clipboard
common
abstract fun produce(initializer: F.(IntArray) -> T): NDStructure<T>
Produces a new N structure using given initializer function.
times
Link copied to clipboard
common
open operator fun T.times(arg: NDStructure<T>): NDStructure<T>
Multiplies an element by a ND structure of it.
open operator fun NDStructure<T>.times(arg: T): NDStructure<T>
Multiplies an ND structure by an element of it.
open operator fun NDStructure<T>.times(b: NDStructure<T>): NDStructure<T>
Multiplies this element by scalar.
open operator fun Number.times(b: NDStructure<T>): NDStructure<T>
Multiplication of this number by element.
open operator fun NDStructure<T>.times(k: Number): NDStructure<T>
Multiplication of this element by a scalar.
toString
Link copied to clipboard
common
open fun toString(): String
unaryMinus
Link copied to clipboard
common
open operator fun NDStructure<T>.unaryMinus(): NDStructure<T>
The negation of this element.
unaryOperation
Link copied to clipboard
common
open fun unaryOperation(operation: String, arg: NDStructure<T>): NDStructure<T>
Dynamically invokes an unary operation with the certain name.
unaryOperationFunction
Link copied to clipboard
common
open override fun unaryOperationFunction(operation: String): (arg: NDStructure<T>) -> NDStructure<T>
Dynamically dispatches an unary operation with the certain name.
unaryPlus
Link copied to clipboard
common
open operator fun NDStructure<T>.unaryPlus(): NDStructure<T>
Returns this value.

Properties

elementContext
Link copied to clipboard
common
abstract val elementContext: F
The algebra over elements of ND structure.
one
Link copied to clipboard
common
abstract val one: NDStructure<T>
neutral operation for multiplication
shape
Link copied to clipboard
common
abstract val shape: IntArray
The shape of ND-structures this algebra operates on.
zero
Link copied to clipboard
common
abstract val zero: NDStructure<T>
The neutral element of addition.

Inheritors

BufferedNDField
Link copied to clipboard