Package org.la4j.vector.functor
Interface VectorAccumulator
-
public interface VectorAccumulatorA vector accumulator that accumulates vector's elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doubleaccumulate()Returns the accumulated value and resets this accumulator.voidupdate(int i, double value)Updates a value that was accumulated so far with new vector's element.
-
-
-
Method Detail
-
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
-
-