Commit 86b38d83 authored by Alexis SALZMAN's avatar Alexis SALZMAN

[xLinAlg] add forEach method to xGenericSparseMatrix class

This method pass in revue all the non null terms (topological sens) and
run a functor on them. The functor is expected to have 3 arguments:
- 2 integer i and j that contains row and column index of term.
- one T val corresponding to term's value.
The functor can do anything you want.

This function offers to user a quick way to deal with all traits.
It may be slightly less efficient then calling getMemoryAcces and by
hand pass in in revue terms according to traits (to be checked). It
depends on what you do.

It will be used internally to replace many duplicated piece of code
where looping on all terms is required. It is already in use with
printMatrixMarket method. Has some test do check matrix market outputs
we can already conclude that forEach is validate.
parent 108593b6
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment