Package org.la4j.matrix.functor
Interface MatrixAccumulator
public interface MatrixAccumulator
A matrix accumulator that accumulates elements across matrix.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Return the accumulated value and resets this accumulator.void
update
(int i, int j, double value) Updates a value that was accumulated so far with new matrix element.
-
Method Details
-
update
void update(int i, int j, double value) Updates a value that was accumulated so far with new matrix element.- Parameters:
i
- the row indexj
- the column indexvalue
- the element's value
-
accumulate
double accumulate()Return the accumulated value and resets this accumulator.- Returns:
- an accumulated value
-