BufferedNDRing

open class BufferedNDRing<T, R : Ring<T>>(shape: IntArray, elementContext: R, bufferFactory: BufferFactory<T>) : BufferedNDGroup<T, R> , NDRing<T, R>

Functions

add
Link copied to clipboard
common
open override fun add(a: NDStructure<T>, b: NDStructure<T>): NDStructure<T>
Element-wise addition.
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.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getFeature
Link copied to clipboard
common
open fun <F : Any> getFeature(structure: NDStructure<T>, type: KClass<F>): F?
Get a feature of the structure in this scope.
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.
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 NDStructure 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.
toString
Link copied to clipboard
common
open fun toString(): String
unaryMinus
Link copied to clipboard
common
open operator override 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

buffer
Link copied to clipboard
common
open val NDStructure<T>.buffer: Buffer<T>
bufferFactory
Link copied to clipboard
common
override val bufferFactory: BufferFactory<T>
elementContext
Link copied to clipboard
common
override val elementContext: R
The algebra over elements of ND structure.
one
Link copied to clipboard
common
open override val one: NDBuffer<T>
neutral operation for multiplication
shape
Link copied to clipboard
common
override val shape: IntArray
The shape of ND-structures this algebra operates on.
strides
Link copied to clipboard
common
open override val strides: Strides
zero
Link copied to clipboard
common
open override val zero: NDBuffer<T>
The neutral element of addition.

Inheritors

BufferedNDField
Link copied to clipboard
ShortNDRing
Link copied to clipboard

Extensions

produceInline
Link copied to clipboard
common
inline fun BufferedNDRing<Short, ShortRing>.produceInline(crossinline initializer: ShortRing.(Int) -> Short): NDBuffer<Short>
Fast element production using function inlining.