pub struct GroupIndex {
pub groups: Vec<GroupMeta>,
pub key_names: Vec<String>,
}Expand description
A deterministic group index built from a TidyView.
Groups are created in first-occurrence order: the first time a key combination appears (scanning visible rows in ascending base-row order), a new group entry is appended. This guarantees a stable, reproducible output ordering regardless of hash-map iteration order.
No column buffers are copied during group construction.
Fields§
§groups: Vec<GroupMeta>Groups in first-occurrence order.
key_names: Vec<String>The column names used as group keys (projected names).
Implementations§
Source§impl GroupIndex
impl GroupIndex
Source§impl GroupIndex
impl GroupIndex
Sourcepub fn build_fast(
base: &DataFrame,
key_col_indices: &[usize],
visible_rows: &[usize],
key_names: Vec<String>,
) -> Self
pub fn build_fast( base: &DataFrame, key_col_indices: &[usize], visible_rows: &[usize], key_names: Vec<String>, ) -> Self
Build a GroupIndex using a BTree-accelerated lookup.
Semantics: identical to GroupIndex::build(). First-occurrence group
ordering is preserved. The only difference is O(N log G) vs O(N × G).
Trait Implementations§
Source§impl Clone for GroupIndex
impl Clone for GroupIndex
Source§fn clone(&self) -> GroupIndex
fn clone(&self) -> GroupIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GroupIndex
impl RefUnwindSafe for GroupIndex
impl Send for GroupIndex
impl Sync for GroupIndex
impl Unpin for GroupIndex
impl UnsafeUnpin for GroupIndex
impl UnwindSafe for GroupIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more