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