matrixOf

@JvmName(name = "matrixOfI")
fun matrixOf(rows: Int, cols: Int, init: (row: Int, col: Int) -> Int): Matrix<Int>(source)
@JvmName(name = "matrixOfD")
fun matrixOf(rows: Int, cols: Int, init: (row: Int, col: Int) -> Double): Matrix<Double>(source)
@JvmName(name = "matrixOfF")
fun matrixOf(rows: Int, cols: Int, init: (row: Int, col: Int) -> Float): Matrix<Float>(source)
@JvmName(name = "matrixOfL")
fun matrixOf(rows: Int, cols: Int, init: (row: Int, col: Int) -> Long): Matrix<Long>(source)

Creates an NxM Matrix, where N == rows and M == cols.

Parameters

rows

of the matrix

cols

of the matrix

init

operation to get each value at row, col