api / koma.util / IndexIterator

IndexIterator

data class IndexIterator :Iterator<IndexIterator>

An Iterator that counts indices of a given shape in row-major order, simultaneously in both array and linear form. Useful for stepping through N-dimensional data.

Constructors

Name Summary
<init> IndexIterator(nd:IntArray, linear:Int= 0)
An Iterator that counts indices of a given shape in row-major order, simultaneously in both array and linear form. Useful for stepping through N-dimensional data.

Properties

Name Summary
linear var linear:Int
nd var nd:IntArray

Functions

Name Summary
hasNext fun hasNext():Boolean
next fun next():IndexIterator

Companion Object Functions

Name Summary
invoke operator fun invoke(shapeFactory: () ->IntArray):Iterable<IndexIterator>