tables::gtable
template <is_table,tuple_ext::is_tuple G>
requires ( std::tuple_size_v<G> > 0 )
struct gtable;
Group of tables
A gtable of type gtable<table<pair<Ts,Ps>…>,std::tuple<Gs…>> is obtained by grouping a table of type table<pair<Ts,Ps>…> by Gs where Gs is a subset of Ts,
It is not recommended to construct a gtable directly, but to use table::group_by. See Grouping for examples.
The implementation stores a map of row<pair<Gs,PGs>…> to a table<pair<NGs,NPGs>…> where NGs are the lookup-types obtained after removing Gs form Ts i.e.Ts / Gs, and the PGs are the corresponding primitive-types.
Member types.
Member type | Definition |
---|---|
ts_t |
Tuple of lookup-types of original table. |
ps_t |
Tuple of primitive-types matching ts_t. |
Original table type. |
|
gs_t |
Tuple of group lookup-types. |
pgs_t |
Tuple of primitive-types matching gs_t. |
gtable_t |
gtable type. |
grow_t |
row type for gtable_t. |
ngs_t |
Tuple of lookup-types obtained by removing gs_t from ts_t. |
ng_table_t |
table-type for lookup-types ngs_t. |
ngrow_t |
row type for ng_table_t. |
map_t |
map of grow_t to ng_table_t. |
Member functions
Constructors / Assignment
Member type | Definition |
---|---|
Constructos the gtable. |
|
Assigns values to a gtable. |
Elements
Member type | Definition |
---|---|
Return true if gtable contains a row. |
|
Return ng_table_t for given grow_t. |
|
Return gtable with take applied to each grouped table. |
|
Return gtable with drop applied to each grouped table. |
|
Return gtable with rtake applied to each grouped table. |
|
Return gtable with rdrop applied to each grouped table. |
Transform
Member type | Definition |
---|---|
Returns gtable with stored tables' columns reversed. |
|
Returns gtable with stored tables' nones replaced. |
|
Returns gtable with stored tables' column replaced with differences of each item with its predecessor. |
|
Returns gtable with stored tables having unique rows. |
|
Returns gtable with stored tables sorted in ascending order using values in selected columns. |
|
Returns gtable with stored tables sorted in ascending order using values in selected columns. |
|
Returns gtable with stored tables sorted in descending order using values in selected columns. |