api / koma.extensions / forEachIndexedN
forEachIndexedN
@JvmName("forEachIndexedNByte") inline fun
NDArray
<
Byte
>.forEachIndexedN(f: (idx:
IntArray
, ele:
Byte
) ->
Unit
):
Unit
@JvmName("forEachIndexedNDouble") inline fun
NDArray
<
Double
>.forEachIndexedN(f: (idx:
IntArray
, ele:
Double
) ->
Unit
):
Unit
@JvmName("forEachIndexedNFloat") inline fun
NDArray
<
Float
>.forEachIndexedN(f: (idx:
IntArray
, ele:
Float
) ->
Unit
):
Unit
@JvmName("forEachIndexedNGeneric") fun <T>
NDArray
<
T
>.forEachIndexedN(f: (idx:
IntArray
, ele:
T
) ->
Unit
):
Unit
@JvmName("forEachIndexedNInt") inline fun
NDArray
<
Int
>.forEachIndexedN(f: (idx:
IntArray
, ele:
Int
) ->
Unit
):
Unit
@JvmName("forEachIndexedNLong") inline fun
NDArray
<
Long
>.forEachIndexedN(f: (idx:
IntArray
, ele:
Long
) ->
Unit
):
Unit
@JvmName("forEachIndexedNShort") inline fun
NDArray
<
Short
>.forEachIndexedN(f: (idx:
IntArray
, ele:
Short
) ->
Unit
):
Unit
Takes each element in a NDArray and passes them through f. Index given to f is the full ND index of the element.
Parameters
f
- A function that takes in an element. Function also takes
in the ND index of the element's location.