|
Aleph-w 7.10.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 910 of file tpl_segment_tree.H.
| using Aleph::Assign_Sum_Policy< T >::lazy_type = std::pair<bool, T> |
Definition at line 913 of file tpl_segment_tree.H.
| using Aleph::Assign_Sum_Policy< T >::value_type = T |
Definition at line 912 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 920 of file tpl_segment_tree.H.
References Aleph::count().
|
inlinestaticconstexprnoexcept |
Definition at line 915 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 926 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 934 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 932 of file tpl_segment_tree.H.