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