dataframe-core-2.2.0.0: Core data structures for the dataframe library.
Safe HaskellNone
LanguageHaskell2010

DataFrame.Internal.Grouping

Synopsis

Documentation

groupBy :: [Text] -> DataFrame -> GroupedDataFrame Source #

O(k * n) group the dataframe by the given key columns, bucketing rows with an open-addressing hash table that re-verifies keys on each hash hit. Groups are numbered in first-appearance order; valueIndices/offsets follow by counting sort.

groupBySeq :: [Text] -> DataFrame -> GroupedDataFrame Source #

The sequential grouping path: a single open-addressing table over all rows, canonically remapped. Always available regardless of capabilities; the parallel path is verified equal to it by a property test.

groupByPar :: [Text] -> DataFrame -> GroupedDataFrame Source #

The parallel partitioned grouping path (see GroupingPar): forks one task per capability, producing output bit-for-bit identical to groupBySeq. Pure via unsafePerformIO (deterministic thread fan-out only).

buildRowToGroup :: Int -> Vector Int -> Vector Int -> Vector Int Source #

Build the rowToGroup lookup vector from valueIndices and offsets. rowToGroup[i] = k means row i belongs to group k.

changingPoints :: Vector (Int, Int) -> Vector Int Source #