Interface MatrixAccumulator
public interface MatrixAccumulator
A matrix accumulator that accumulates elements across matrix.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturn the accumulated value and resets this accumulator.voidupdate(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
-