Strides

abstract class Strides : ShapeIndexer(source)

Linear transformation of indexes

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun asSequence(): Sequence<IntArray>

Iterate over ND indices in a natural order

Link copied to clipboard
fun <T, S : Group<T>, ScaleOperations<T>> Iterable<T>.averageWith(space: S): T

Returns an average value of elements in the iterable in this Group.

Link copied to clipboard
inline fun <T, R> Iterable<T>.cumulative(initial: R, crossinline operation: (R, T) -> R): Iterable<R>
Link copied to clipboard
@JvmName(name = "cumulativeSumOfDouble")
fun Iterable<Double>.cumulativeSum(): Iterable<Double>
@JvmName(name = "cumulativeSumOfInt")
fun Iterable<Int>.cumulativeSum(): Iterable<Int>
@JvmName(name = "cumulativeSumOfLong")
fun Iterable<Long>.cumulativeSum(): Iterable<Long>

Cumulative sum with custom space

Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean
Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard
abstract fun index(offset: Int): IntArray

Get multidimensional from linear

Link copied to clipboard
open operator override fun iterator(): Iterator<IntArray>
Link copied to clipboard
open override fun offset(index: IntArray): Int

Get linear index from multidimensional index

Link copied to clipboard
fun <T> Iterable<T>.sumWith(group: Group<T>): T

Returns the sum of all elements in the iterable in provided space.

Link copied to clipboard
inline fun <T, R> Iterable<T>.sumWithGroupOf(group: Group<R>, extractor: (T) -> R): R

Sum extracted elements of Iterable with given group

Properties

Link copied to clipboard
abstract val linearSize: Int

The size of linear buffer to accommodate all elements of ND-structure corresponding to strides

Link copied to clipboard
abstract val shape: ShapeND