BufferedFieldOpsND

open class BufferedFieldOpsND<T, out A : Field<T>>(bufferAlgebra: BufferAlgebra<T, A>, indexerBuilder: (IntArray) -> ShapeIndexer) : BufferedRingOpsND<T, A> , FieldOpsND<T, A>

Constructors

Link copied to clipboard
fun <out A : Field<T>> BufferedFieldOpsND(elementAlgebra: A, bufferFactory: BufferFactory<T>, indexerBuilder: (IntArray) -> ShapeIndexer = BufferAlgebraND.defaultIndexerBuilder)

Functions

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

Element-wise addition.

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

Dynamically invokes a binary operation with the certain name.

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

Dynamically dispatches a binary operation with the certain name.

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

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

Link copied to clipboard
open fun bindSymbolOrNull(value: String): StructureND<T>?

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

Link copied to clipboard
open operator fun T.div(arg: StructureND<T>): StructureND<T>

Divides an element by an ND structure of it.

open operator fun StructureND<T>.div(arg: T): StructureND<T>

Divides an ND structure by an element of it.

open operator fun StructureND<T>.div(arg: StructureND<T>): StructureND<T>

Division of two elements.

open operator fun StructureND<T>.div(k: Number): StructureND<T>

Division of this element by scalar.

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

Element-wise division.

Link copied to clipboard
open fun export(arg: StructureND<T>): StructureND<T>

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<T>, 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
open operator fun (T) -> T.invoke(structure: StructureND<T>): StructureND<T>

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<T>.map(transform: A.(T) -> T): StructureND<T>

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<T>.mapIndexed(transform: A.(index: IntArray, T) -> T): StructureND<T>

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

Link copied to clipboard
open operator fun T.minus(arg: StructureND<T>): StructureND<T>

Subtracts an ND structure from an element of it.

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

Subtracts an element from ND structure of it.

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

Subtraction of two elements.

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

Element-wise multiplication.

Link copied to clipboard
open operator fun T.plus(arg: StructureND<T>): StructureND<T>

Adds an element to ND structure of it.

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

Adds an ND structure to an element of it.

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

Addition of two elements.

Link copied to clipboard
open override fun scale(a: StructureND<T>, value: Double): StructureND<T>

Scaling an element by a scalar.

Link copied to clipboard
abstract fun structureND(shape: Shape, initializer: A.(IntArray) -> T): StructureND<T>

Produces a new StructureND using given initializer function.

Link copied to clipboard
open operator fun T.times(arg: StructureND<T>): StructureND<T>

Multiplies an element by a ND structure of it.

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

Multiplies an ND structure by an element of it.

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

Multiplies this element by scalar.

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

Multiplication of this number by element.

open operator fun StructureND<T>.times(k: Number): StructureND<T>

Multiplication of this element by a scalar.

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

The negation of this element.

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

Dynamically invokes a unary operation with the certain name.

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

Dynamically dispatches a unary operation with the certain name.

Link copied to clipboard
open operator fun StructureND<T>.unaryPlus(): StructureND<T>

Returns this value.

Link copied to clipboard
@PerformancePitfall(message = "Very slow on remote execution algebras")
open fun zip(left: StructureND<T>, right: StructureND<T>, transform: A.(T, T) -> T): StructureND<T>

Combines two structures into one.

Properties

Link copied to clipboard
open override val bufferAlgebra: BufferAlgebra<T, A>
Link copied to clipboard
abstract val elementAlgebra: A

The algebra over elements of ND structure.

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

Inheritors

Link copied to clipboard

Sources

Link copied to clipboard