Package space.kscience.kmath.nd

Types

AlgebraND
Link copied to clipboard
common
interface AlgebraND<T, out C : Algebra<T>>
The base interface for all ND-algebra implementations.
BufferAlgebraND
Link copied to clipboard
common
interface BufferAlgebraND<T, out A : Algebra<T>> : AlgebraND<T, A>
BufferedFieldOpsND
Link copied to clipboard
common
open class BufferedFieldOpsND<T, out A : Field<T>>(bufferAlgebra: BufferAlgebra<T, A>, indexerBuilder: (IntArray) -> ShapeIndex) : BufferedRingOpsND<T, A> , FieldOpsND<T, A>
BufferedGroupNDOps
Link copied to clipboard
common
open class BufferedGroupNDOps<T, out A : Group<T>>(bufferAlgebra: BufferAlgebra<T, A>, indexerBuilder: (IntArray) -> ShapeIndex) : GroupOpsND<T, A> , BufferAlgebraND<T, A>
BufferedRingOpsND
Link copied to clipboard
common
open class BufferedRingOpsND<T, out A : Ring<T>>(bufferAlgebra: BufferAlgebra<T, A>, indexerBuilder: (IntArray) -> ShapeIndex) : BufferedGroupNDOps<T, A> , RingOpsND<T, A>
BufferND
Link copied to clipboard
common
open class BufferND<out T>(indexes: ShapeIndex, buffer: Buffer<T>) : StructureND<T>
Represents StructureND over Buffer.
DefaultStrides
Link copied to clipboard
common
class DefaultStrides : Strides
Simple implementation of Strides.
DoubleBufferND
Link copied to clipboard
common
class DoubleBufferND(indexes: ShapeIndex, buffer: DoubleBuffer) : BufferND<Double>
DoubleFieldND
Link copied to clipboard
common
class DoubleFieldND(shape: Shape) : DoubleFieldOpsND, FieldND<Double, DoubleField> , NumbersAddOps<StructureND<Double>>
DoubleFieldOpsND
Link copied to clipboard
FieldND
Link copied to clipboard
common
interface FieldND<T, out A : Field<T>> : Field<StructureND<T>> , FieldOpsND<T, A> , RingND<T, A> , WithShape
FieldOpsND
Link copied to clipboard
common
interface FieldOpsND<T, out A : Field<T>> : FieldOps<StructureND<T>> , RingOpsND<T, A> , ScaleOperations<StructureND<T>>
Field of StructureND.
GroupND
Link copied to clipboard
common
interface GroupND<T, out A : Group<T>> : Group<StructureND<T>> , GroupOpsND<T, A> , WithShape
GroupOpsND
Link copied to clipboard
common
interface GroupOpsND<T, out A : GroupOps<T>> : GroupOps<StructureND<T>> , AlgebraND<T, A>
Space of StructureND.
MutableBufferND
Link copied to clipboard
common
class MutableBufferND<T>(strides: ShapeIndex, buffer: MutableBuffer<T>) : BufferND<T> , MutableStructureND<T>
MutableStructure1D
Link copied to clipboard
common
interface MutableStructure1D<T> : Structure1D<T> , MutableStructureND<T> , MutableBuffer<T>
A mutable structure that is guaranteed to be one-dimensional
MutableStructure2D
Link copied to clipboard
common
interface MutableStructure2D<T> : Structure2D<T> , MutableStructureND<T>
Represents mutable Structure2D.
MutableStructureND
Link copied to clipboard
common
interface MutableStructureND<T> : StructureND<T>
Represents mutable StructureND.
RingND
Link copied to clipboard
common
interface RingND<T, out A : Ring<T>> : Ring<StructureND<T>> , RingOpsND<T, A> , GroupND<T, A> , WithShape
RingOpsND
Link copied to clipboard
common
interface RingOpsND<T, out A : RingOps<T>> : RingOps<StructureND<T>> , GroupOpsND<T, A>
Ring of StructureND.
Shape
Link copied to clipboard
common
typealias Shape = IntArray
ShapeIndex
Link copied to clipboard
common
interface ShapeIndex
A converter from linear index to multivariate index
ShapeMismatchException
Link copied to clipboard
common
class ShapeMismatchException(expected: IntArray, actual: IntArray) : RuntimeException
An exception is thrown when the expected and actual shape of NDArray differ.
ShortRingND
Link copied to clipboard
common
class ShortRingND(shape: Shape) : ShortRingOpsND, RingND<Short, ShortRing> , NumbersAddOps<StructureND<Short>>
ShortRingOpsND
Link copied to clipboard
common
sealed class ShortRingOpsND : BufferedRingOpsND<Short, ShortRing>
Strides
Link copied to clipboard
common
abstract class Strides : ShapeIndex
Linear transformation of indexes
Structure1D
Link copied to clipboard
common
interface Structure1D<out T> : StructureND<T> , Buffer<T>
A structure that is guaranteed to be one-dimensional
Structure2D
Link copied to clipboard
common
interface Structure2D<out T> : StructureND<T>
A structure that is guaranteed to be two-dimensional.
StructureFeature
Link copied to clipboard
common
interface StructureFeature : Feature<StructureFeature>
StructureND
Link copied to clipboard
common
interface StructureND<out T> : Featured<StructureFeature>
Represents n-dimensional structure i.e., multidimensional container of items of the same type and size.
WithShape
Link copied to clipboard
common
interface WithShape

Functions

as1D
Link copied to clipboard
common
fun <T> MutableStructureND<T>.as1D(): MutableStructure1D<T>
fun <T> StructureND<T>.as1D(): Structure1D<T>
Represent a StructureND as Structure1D.
as2D
Link copied to clipboard
common
fun <T> MutableStructureND<T>.as2D(): MutableStructure2D<T>
Represents a StructureND as Structure2D.
fun <T> StructureND<T>.as2D(): Structure2D<T>
Represents a StructureND as Structure2D.
asND
Link copied to clipboard
common
fun <T> Buffer<T>.asND(): Structure1D<T>
Represent this buffer as 1D structure
contentEquals
Link copied to clipboard
common
fun <T : Comparable<T>> LinearSpace<T, Ring<T>>.contentEquals(st1: StructureND<T>, st2: StructureND<T>): Boolean
Indicates whether some StructureND is equal to another one.
fun <T : Comparable<T>> AlgebraND<T, Ring<T>>.contentEquals(st1: StructureND<T>, st2: StructureND<T>): Boolean
Indicates whether some StructureND is equal to another one.
fun <T : Comparable<T>> LinearSpace<T, Ring<T>>.contentEquals(st1: StructureND<T>, st2: StructureND<T>, absoluteTolerance: T): Boolean
Indicates whether some StructureND is equal to another one with absoluteTolerance.
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.
get
Link copied to clipboard
common
operator fun <T> StructureND<T>.get(vararg index: Int): T
Returns the value at the specified indices.
getFeature
Link copied to clipboard
common
inline fun <T : Any, F : StructureFeature> AlgebraND<T, *>.getFeature(structure: StructureND<T>): F?
Get a feature of the structure in this scope.
mapInline
Link copied to clipboard
common
inline fun <T, A : Algebra<T>> BufferAlgebraND<T, A>.mapInline(arg: BufferND<T>, crossinline transform: A.(T) -> T): BufferND<T>
mapInPlace
Link copied to clipboard
common
inline fun <T> MutableStructureND<T>.mapInPlace(action: (index: IntArray, T) -> T)
Transform a structure element-by element in place.
mapToBuffer
Link copied to clipboard
common
inline fun <T, R : Any> StructureND<T>.mapToBuffer(factory: BufferFactory<R> = Buffer.Companion::auto, crossinline transform: (T) -> R): BufferND<R>
Transform structure to a new structure using provided BufferFactory and optimizing if argument is BufferND
mapToMutableBuffer
Link copied to clipboard
common
inline fun <T, R : Any> MutableStructureND<T>.mapToMutableBuffer(factory: MutableBufferFactory<R> = MutableBuffer.Companion::auto, crossinline transform: (T) -> R): MutableBufferND<R>
Transform structure to a new structure using provided MutableBufferFactory and optimizing if argument is MutableBufferND
ndAlgebra
Link copied to clipboard
common
fun DoubleField.ndAlgebra(vararg shape: Int): DoubleFieldND
one
Link copied to clipboard
common
fun <T, A : Ring<T>> AlgebraND<T, A>.one(shape: Shape): StructureND<T>
@JvmName(name = oneVarArg)
fun <T, A : Ring<T>> AlgebraND<T, A>.one(shapeFirst: Int, vararg shapeRest: Int): StructureND<T>
Shape
Link copied to clipboard
common
fun Shape(shapeFirst: Int, vararg shapeRest: Int): Shape
structureND
Link copied to clipboard
common
fun <T, EA : Algebra<T>, A : BufferAlgebraND<T, EA>, WithShape> A.structureND(initializer: EA.(IntArray) -> T): BufferND<T>
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>
withNdAlgebra
Link copied to clipboard
common
inline fun <R> DoubleField.withNdAlgebra(vararg shape: Int, action: DoubleFieldND.() -> R): R
Produce a context for n-dimensional operations inside this real field
inline fun <R> ShortRing.withNdAlgebra(vararg shape: Int, action: ShortRingND.() -> R): R
zero
Link copied to clipboard
common
fun <T, A : Group<T>> AlgebraND<T, A>.zero(shape: Shape): StructureND<T>
@JvmName(name = zeroVarArg)
fun <T, A : Group<T>> AlgebraND<T, A>.zero(shapeFirst: Int, vararg shapeRest: Int): StructureND<T>
zip
Link copied to clipboard
common
inline fun <T : Any> StructureND<T>.zip(struct: StructureND<T>, crossinline block: (T, T) -> T): StructureND<T>

Properties

nd
Link copied to clipboard
common
val <T, A : Group<T>> BufferAlgebra<T, A>.nd: BufferedGroupNDOps<T, A>
nd
Link copied to clipboard
common
val <T, A : Ring<T>> BufferAlgebra<T, A>.nd: BufferedRingOpsND<T, A>
nd
Link copied to clipboard
common
val <T, A : Field<T>> BufferAlgebra<T, A>.nd: BufferedFieldOpsND<T, A>
ndAlgebra
Link copied to clipboard
common
val DoubleField.ndAlgebra: DoubleFieldOpsND