|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Range assign + range sum policy. More...
#include <tpl_segment_tree.H>
Public Types | |
| using | value_type = T |
| using | lazy_type = std::pair< bool, T > |
Static Public Member Functions | |
| static constexpr T | combine (const T &a, const T &b) noexcept |
| static constexpr T | apply (const T &val, const lazy_type &lz, size_t count) noexcept |
| static constexpr lazy_type | compose (const lazy_type &old_lz, const lazy_type &new_lz) noexcept |
| static constexpr T | value_identity () noexcept |
| static constexpr lazy_type | lazy_identity () noexcept |
Range assign + range sum policy.
Policy for Gen_Lazy_Segment_Tree implementing "range assign" + "range sum" updates/queries.
combine(a, b) = a + bapply(val, (true, x), count) = x * countcompose(old, new): new overrides old if new.first is true.The lazy type is pair<bool, T> where first indicates whether an assignment is pending.
| T | arithmetic type. |
Definition at line 861 of file tpl_segment_tree.H.
Definition at line 864 of file tpl_segment_tree.H.
Definition at line 863 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 871 of file tpl_segment_tree.H.
References Aleph::count(), and Aleph::divide_and_conquer_partition_dp().
|
inlinestaticconstexprnoexcept |
Definition at line 866 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 877 of file tpl_segment_tree.H.
References Aleph::divide_and_conquer_partition_dp().
|
inlinestaticconstexprnoexcept |
Definition at line 885 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 883 of file tpl_segment_tree.H.