Defined in File SparseAccumulator.hpp
The SparseAccumulator class represents the sparse accumulator datastructure as described in Kepner, Jeremy, and John Gilbert, eds. Graph algorithms in the language of linear algebra. Vol. 22. SIAM, 2011. It is used as temporal storage for efficient computations on matrices.
Public Functions
Constructs the SparseAccumulator with size size.
size – The size of the SparseAccumulator.
Stores value at pos. If a valid value is already stored at pos then @value is added to that.
value – The value to store or add at pos in values.
pos – The position in values.
Stores value at pos. If a valid value is already stored at pos then we call the binary handle function with the stored value and the new value as arguments.
value – The value to store or add at pos in values.
pos – The position in values.
handle – (double, double) -> double
Calls handle for each non zero value of the current row.
Note
handle signature: handle(index row, index column, double value)
The number of non zero values in the current row.
Sets the SparseAccumulator to the next row which invalidates all currently stored data.