api / koma.extensions / forEach
forEach
@JvmName("forEachDouble") inline fun
Matrix
<
Double
>.forEach(f: (
Double
) ->
Unit
):
Unit
@JvmName("forEachFloat") inline fun
Matrix
<
Float
>.forEach(f: (
Float
) ->
Unit
):
Unit
@JvmName("forEachGeneric") fun <T>
Matrix
<
T
>.forEach(f: (
T
) ->
Unit
):
Unit
@JvmName("forEachInt") inline fun
Matrix
<
Int
>.forEach(f: (
Int
) ->
Unit
):
Unit
Passes each element in row major order into a function.
Parameters
f
- A function that takes in an element@JvmName("forEachByte") inline fun
NDArray
<
Byte
>.forEach(f: (ele:
Byte
) ->
Unit
):
Unit
@JvmName("forEachDouble") inline fun
NDArray
<
Double
>.forEach(f: (ele:
Double
) ->
Unit
):
Unit
@JvmName("forEachFloat") inline fun
NDArray
<
Float
>.forEach(f: (ele:
Float
) ->
Unit
):
Unit
@JvmName("forEachGeneric") fun <T>
NDArray
<
T
>.forEach(f: (ele:
T
) ->
Unit
):
Unit
@JvmName("forEachInt") inline fun
NDArray
<
Int
>.forEach(f: (ele:
Int
) ->
Unit
):
Unit
@JvmName("forEachLong") inline fun
NDArray
<
Long
>.forEach(f: (ele:
Long
) ->
Unit
):
Unit
@JvmName("forEachShort") inline fun
NDArray
<
Short
>.forEach(f: (ele:
Short
) ->
Unit
):
Unit
Takes each element in a NDArray and passes them through f.
Parameters
f
- A function that takes in an element