-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
921 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
table/src/main/java/org/enso/table/data/column/operation/aggregate/Aggregator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.enso.table.data.column.operation.aggregate; | ||
|
||
import org.enso.table.data.column.storage.Storage; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Represents a fold-like operation on a storage. An aggregator is usually created for a given | ||
* storage, then {@link #nextGroup(List)} is repeatedly called and the aggregator is responsible for | ||
* collecting the results of such calls. After that, {@link #seal()} is called to obtain a storage | ||
* containing all the results. | ||
*/ | ||
public abstract class Aggregator { | ||
/** | ||
* Requests the aggregator to append the result of aggregating the values at the specified | ||
* positions. | ||
* | ||
* @param positions the positions to aggregate in this round. | ||
*/ | ||
public abstract void nextGroup(List<Integer> positions); | ||
|
||
/** | ||
* Returns the results of all previous {@link #nextGroup(List)} calls. | ||
* | ||
* @return the storage containing all aggregation results. | ||
*/ | ||
public abstract Storage seal(); | ||
} |
Oops, something went wrong.