api / koma.matrix / Matrix / mapColsToList
mapColsToList
open fun <U> mapColsToList(f: (
Matrix
<
T
>) ->
U
):
List
<
U
>
Takes each col in a matrix, passes them through f, and puts the outputs into a List. In contrast to this#mapCols, the usage of a list as the output container allows for arbitrary output types, such as taking a double matrix and returning a list of strings.
Parameters
f
- A function that takes in a Nx1 col and returns a Mx1 col. Note that all output
cols must be the same length.