forEach

inline fun <T> SparseMatrix<T>.forEach(action: (T) -> Unit)

Perform the action for each value in the (sparse) matrix.


inline fun <T> Matrix<T>.forEach(action: (T) -> Unit)

Perform the action for each value in the matrix. This version uses the non-sparse nature of the matrix.