api / koma.matrix / Matrix / mapRows


open fun mapRows(f: (Matrix<T>) ->Matrix<T>):Matrix<T>

Takes each row in a matrix, passes them through f, and puts the output of f into a row of an output matrix.


f - A function that takes in a 1xN row and returns a 1xM row. Note that all output rows must be the same length. In addition, the input and output element types must be the same.

Return the new matrix after each row is mapped through f