This class represents the pack of combiners associated with every node of a Dynamic Segment Tree.
More...
#include <dynamic_segment_tree.hpp>
|
using | MyType = CombinerPack< KeyT, AggValueT, Combiners... > |
|
using | pack = std::tuple< Combiners... > |
|
|
bool | rebuild (KeyT my_point, const MyType *left_child, AggValueT left_edge_val, const MyType *right_child, AggValueT right_edge_val) |
| Rebuilds all combiners at this node from its children's combiners. More...
|
|
bool | collect_left (KeyT my_point, const MyType *left_child_combiner, AggValueT edge_val) |
|
bool | collect_right (KeyT my_point, const MyType *right_child_combiner, AggValueT edge_val) |
|
bool | traverse_left_edge_up (KeyT new_point, AggValueT edge_val) |
|
bool | traverse_right_edge_up (KeyT new_point, AggValueT edge_val) |
|
template<class Combiner > |
Combiner::ValueT | get () const |
| Returns the combined value of a combiner contained in this CombinerPack. More...
|
|
template<class Combiner > |
const Combiner & | get_combiner () const |
| Returns a combiner contained in this CombinerPack. More...
|
|
template<class KeyT, class AggValueT, class... Combiners>
class ygg::CombinerPack< KeyT, AggValueT, Combiners >
This class represents the pack of combiners associated with every node of a Dynamic Segment Tree.
A DynamicSegmentTree can have multiple combiners associated with each node. See TODO for details. Every combiner allows to retrieve a different combined metric (such as maximum, minimum, …) of the aggregate values over arbitrary ranges in the Dynamic Segment Tree.
- Template Parameters
-
KeyT | The type of the interval borders |
AggValueT | The type of the aggregate values in your DynamicSegmentTree |
Combiners | A list of combiner classes |
◆ get()
template<class KeyT , class AggValueT , class... Combiners>
template<class Combiner >
Returns the combined value of a combiner contained in this CombinerPack.
- Template Parameters
-
Combiner | The class of the combiner that you want the combined value of |
- Returns
- The combined value of the combiner specified in the Combiner template parameter
◆ get_combiner()
template<class KeyT , class AggValueT , class... Combiners>
template<class Combiner >
const Combiner& ygg::CombinerPack< KeyT, AggValueT, Combiners >::get_combiner |
( |
| ) |
const |
Returns a combiner contained in this CombinerPack.
- Template Parameters
-
Combiner | The class of the combiner that you want |
- Returns
- The combiner specified in the Combiner template parameter
◆ rebuild()
template<class KeyT , class AggValueT , class... Combiners>
bool ygg::CombinerPack< KeyT, AggValueT, Combiners >::rebuild |
( |
KeyT |
my_point, |
|
|
const MyType * |
left_child, |
|
|
AggValueT |
left_edge_val, |
|
|
const MyType * |
right_child, |
|
|
AggValueT |
right_edge_val |
|
) |
| |
Rebuilds all combiners at this node from its children's combiners.
This method calls the rebuild() method on all combiners attached to this node with the respective combined values from the left / right child.
- Parameters
-
my_point | The point of the node this CombinerPack belongs to |
left_child | The CombinerPack of the left child (or nullptr) |
left_edge_val | The agg_left value of this node |
right_child | The CombinerPack of the right child (or nullptr) |
right_edge_val | The agg_right value of this node |
- Returns
- TODO IGNORED
The documentation for this class was generated from the following file: