map

inline fun <T, R> Matrix<T>.map(transform: (T) -> R): Matrix<R>

A map function that creates a new matrix with each cell mapped by transform.

Receiver

The matrix to copy from. This also determines the dimensions

Parameters

transform

The function used to transform the


inline fun <T, R> SparseMatrix<T>.map(transform: (T) -> R): SparseMatrix<R>

A map function that creates a new (sparse) matrix with each cell mapped by transform.

Receiver

The matrix to copy from. This also determines the dimensions

Parameters

transform

The function used to transform the cell values