Package com.cupoftea.table
Class GroupAccumulators.LongSumAccumulator
java.lang.Object
com.cupoftea.table.GroupAccumulators.LongSumAccumulator
- All Implemented Interfaces:
GroupAccumulator
- Enclosing class:
- GroupAccumulators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulate(int groupId, int row) Accumulates rowrowfrom the source vector into groupgroupId.finish(int numGroups) Finishes accumulation and returns the typed outputColumnVectorof sizenumGroups.voidmerge(GroupAccumulator other) Merges another accumulator of the same type into this accumulator.
-
Constructor Details
-
LongSumAccumulator
-
-
Method Details
-
accumulate
public void accumulate(int groupId, int row) Description copied from interface:GroupAccumulatorAccumulates rowrowfrom the source vector into groupgroupId.- Specified by:
accumulatein interfaceGroupAccumulator- Parameters:
groupId- the 0-based group IDrow- the row index in the source vector
-
merge
Description copied from interface:GroupAccumulatorMerges another accumulator of the same type into this accumulator. Used for parallel chunk reduction.- Specified by:
mergein interfaceGroupAccumulator- Parameters:
other- the other accumulator to merge
-
finish
Description copied from interface:GroupAccumulatorFinishes accumulation and returns the typed outputColumnVectorof sizenumGroups.- Specified by:
finishin interfaceGroupAccumulator- Parameters:
numGroups- total number of groups- Returns:
- the populated output vector
-