|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Range add + range sum policy. More...
#include <tpl_segment_tree.H>
Public Types | |
| using | value_type = T |
| using | lazy_type = T |
Static Public Member Functions | |
| static constexpr T | combine (const T &a, const T &b) noexcept |
| static constexpr T | apply (const T &val, const T &delta, size_t count) noexcept |
| static constexpr T | compose (const T &old_lazy, const T &new_lazy) noexcept |
| static constexpr T | value_identity () noexcept |
| static constexpr T | lazy_identity () noexcept |
Range add + range sum policy.
Policy for Gen_Lazy_Segment_Tree implementing the classic "range add" + "range sum" segment tree.
combine(a, b) = a + bapply(val, delta, count) = val + delta * countcompose(old, new) = old + new| T | arithmetic type. |
Definition at line 727 of file tpl_segment_tree.H.
Definition at line 730 of file tpl_segment_tree.H.
Definition at line 729 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 737 of file tpl_segment_tree.H.
References Aleph::count().
|
inlinestaticconstexprnoexcept |
Definition at line 732 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 743 of file tpl_segment_tree.H.
References Aleph::divide_and_conquer_partition_dp().
|
inlinestaticconstexprnoexcept |
Definition at line 750 of file tpl_segment_tree.H.
|
inlinestaticconstexprnoexcept |
Definition at line 749 of file tpl_segment_tree.H.