NDRing

interface NDRing<T, R : Ring<T>> : Ring<NDStructure<T>> , NDSpace<T, R>

Ring of NDStructure.

Parameters

T

the type of the element contained in ND structure.

N

the type of ND structure.

R

the type of ring of structure elements.

Types

Companion
Link copied to clipboard
common
object Companion

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: R.(T, T) -> T): NDStructure<T>
Combines two structures into one.
div
Link copied to clipboard
common
open operator fun NDStructure<T>.div(k: Number): NDStructure<T>
Division of this element by scalar.
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: R.(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: R.(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
open override fun multiply(a: NDStructure<T>, b: NDStructure<T>): NDStructure<T>
Element-wise multiplication.
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: R.(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: R
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

BufferedNDRing
Link copied to clipboard
NDField
Link copied to clipboard