Companion

Functions

Link copied to clipboard
open override fun add(left: StructureND<Short>, right: StructureND<Short>): StructureND<Short>

Element-wise addition.

Link copied to clipboard
open fun binaryOperation(operation: String, left: StructureND<Short>, right: StructureND<Short>): StructureND<Short>

Dynamically invokes a binary operation with the certain name.

Link copied to clipboard
open override fun binaryOperationFunction(operation: String): (left: StructureND<Short>, right: StructureND<Short>) -> StructureND<Short>

Dynamically dispatches a binary operation with the certain name.

Link copied to clipboard
open fun bindSymbol(value: String): StructureND<Short>

The same as bindSymbolOrNull but throws an error if symbol could not be bound

Link copied to clipboard
fun <T> Algebra<T>.bindSymbol(symbol: Symbol): T
Link copied to clipboard

Wraps a raw string to T object. This method is designed for three purposes:

Link copied to clipboard
fun <T> Algebra<T>.bindSymbolOrNull(symbol: Symbol): T?
Link copied to clipboard

Indicates whether some StructureND is equal to another one.

fun <T : Comparable<T>> GroupOpsND<T, Ring<T>>.contentEquals(st1: StructureND<T>, st2: StructureND<T>, absoluteTolerance: T): Boolean

Indicates whether some StructureND is equal to another one with absoluteTolerance.

Link copied to clipboard

Export an algebra element, so it could be accessed even after algebra scope is closed. This method must be used on algebras where data is stored externally or any local algebra state is used. By default (if not overridden), exports the object itself.

Link copied to clipboard
open fun <F : StructureFeature> getFeature(structure: StructureND<Short>, type: KClass<out F>): F?

Get a feature of the structure in this scope. Structure features take precedence other context features.

Link copied to clipboard
inline fun <T : Any, F : StructureFeature> AlgebraND<T, *>.getFeature(structure: StructureND<T>): F?

Get a feature of the structure in this scope. Structure features take precedence other context features.

Link copied to clipboard
open operator fun (Short) -> Short.invoke(structure: StructureND<Short>): StructureND<Short>

Element-wise invocation of function working on T on a StructureND.

Link copied to clipboard
@PerformancePitfall(message = "Very slow on remote execution algebras")
open fun StructureND<Short>.map(transform: ShortRing.(Short) -> Short): StructureND<Short>

Maps elements from one structure to another one by applying transform to them.

Link copied to clipboard
@PerformancePitfall(message = "Very slow on remote execution algebras")
open fun StructureND<Short>.mapIndexed(transform: ShortRing.(index: IntArray, Short) -> Short): StructureND<Short>

Maps elements from one structure to another one by applying transform to them alongside with their indices.

Link copied to clipboard
inline fun <T, A : Algebra<T>> BufferAlgebraND<T, A>.mapInline(arg: BufferND<T>, crossinline transform: A.(T) -> T): BufferND<T>
Link copied to clipboard
open operator fun Short.minus(arg: StructureND<Short>): StructureND<Short>

Subtracts an ND structure from an element of it.

open operator fun StructureND<Short>.minus(arg: Short): StructureND<Short>

Subtracts an element from ND structure of it.

Subtraction of two elements.

Link copied to clipboard
open override fun multiply(left: StructureND<Short>, right: StructureND<Short>): StructureND<Short>

Element-wise multiplication.

Link copied to clipboard
fun <T, A : Ring<T>> AlgebraND<T, A>.one(shape: ShapeND): StructureND<T>
@JvmName(name = "oneVarArg")
fun <T, A : Ring<T>> AlgebraND<T, A>.one(shapeFirst: Int, vararg shapeRest: Int): StructureND<T>
Link copied to clipboard
open operator fun Short.plus(arg: StructureND<Short>): StructureND<Short>

Adds an element to ND structure of it.

open operator fun StructureND<Short>.plus(arg: Short): StructureND<Short>

Adds an ND structure to an element of it.

Addition of two elements.

Link copied to clipboard
abstract fun structureND(shape: ShapeND, initializer: ShortRing.(IntArray) -> Short): StructureND<Short>

Produces a new StructureND using given initializer function.

Link copied to clipboard
fun <T, A : Algebra<T>> BufferAlgebraND<T, A>.structureND(vararg shape: Int, initializer: A.(IntArray) -> T): BufferND<T>
fun <T, A : Algebra<T>> AlgebraND<T, A>.structureND(shapeFirst: Int, vararg shapeRest: Int, initializer: A.(IntArray) -> T): StructureND<T>
Link copied to clipboard
open operator fun Short.times(arg: StructureND<Short>): StructureND<Short>

Multiplies an element by a ND structure of it.

open operator fun StructureND<Short>.times(arg: Short): StructureND<Short>

Multiplies an ND structure by an element of it.

Multiplies this element by scalar.

Link copied to clipboard
Link copied to clipboard
open operator override fun StructureND<Short>.unaryMinus(): StructureND<Short>

The negation of this element.

Link copied to clipboard
open fun unaryOperation(operation: String, arg: StructureND<Short>): StructureND<Short>

Dynamically invokes a unary operation with the certain name.

Link copied to clipboard
open override fun unaryOperationFunction(operation: String): (arg: StructureND<Short>) -> StructureND<Short>

Dynamically dispatches a unary operation with the certain name.

Link copied to clipboard

Returns this value.

Link copied to clipboard
fun <T, A : Group<T>> AlgebraND<T, A>.zero(shape: ShapeND): StructureND<T>
@JvmName(name = "zeroVarArg")
fun <T, A : Group<T>> AlgebraND<T, A>.zero(shapeFirst: Int, vararg shapeRest: Int): StructureND<T>
Link copied to clipboard
@PerformancePitfall(message = "Very slow on remote execution algebras")
open fun zip(left: StructureND<Short>, right: StructureND<Short>, transform: ShortRing.(Short, Short) -> Short): StructureND<Short>

Combines two structures into one.

Properties

Link copied to clipboard
Link copied to clipboard

Provide a factory for buffers, associated with this Algebra

Link copied to clipboard

The algebra over elements of ND structure.

Link copied to clipboard
open override val indexerBuilder: (ShapeND) -> ShapeIndexer