the prefix aggregates of the values of an array of values of G that tells its changes [see ObservableArray], a Fenwick< G > kept by its events
More...
#include <ADS/sequence/Fenwick.h>
|
| | FenwickObserver (void)=default |
| | an observer of no array, given one later by rebuild()
|
template<class A>
requires requires( const A & a ) { { a.values() } -> std::same_as< const std::vector< Value > & >; } |
| | FenwickObserver (const A &a) |
| | the observer of the array \( a \), its tree built from it
|
template<class A>
requires requires( const A & a ) { { a.values() } -> std::same_as< const std::vector< Value > & >; } |
| void | rebuild (const A &a) |
| | the tree built again from the array \( a \), whose vector of values a.values() it reads from now on when Rebuilt comes
|
| void | on (const Assign &e) |
| | \( a_h \gets \mathit{to} \)
|
| void | on (const Insert &e) |
| | the value appended
|
| void | on (const Erase &) noexcept |
| | the last value removed
|
| void | on (const mod::Cleared &) noexcept |
| | no value
|
| void | on (const mod::Rebuilt &) noexcept |
| | the tree forgotten, built again at the next query
|
| void | flush (void) const |
| | the tree built again if Rebuilt came
|
| std::size_t | size (void) const |
| | the number of values
|
| Value | prefix (std::size_t r) const |
| | the prefix \( \pi_r \) [see Fenwick::prefix()]
|
| Value | range (std::size_t l, std::size_t r) const |
| | the range \( a_l \oplus \cdots \oplus a_{r-1} \)
|
| const Fenwick< G > & | tree (void) const |
| | the tree
|
| template<class A> |
| bool | audit (const A &a) const |
| | whether the tree has the values of the array \( a \) and, when they are exact, its prefixes are those of a scan of \( a \)
|
template<Monoid G>
class ADS::FenwickObserver< G >
the prefix aggregates of the values of an array of values of G that tells its changes [see ObservableArray], a Fenwick< G > kept by its events
◆ Assign
◆ Erase
◆ Insert
◆ FenwickObserver() [1/2]
an observer of no array, given one later by rebuild()
◆ FenwickObserver() [2/2]
template<Monoid G>
template<class A>
requires requires( const A & a ) { { a.values() } -> std::same_as< const std::vector< Value > & >; }
the observer of the array \( a \), its tree built from it
◆ audit()
template<Monoid G>
template<class A>
whether the tree has the values of the array \( a \) and, when they are exact, its prefixes are those of a scan of \( a \)
◆ flush()
the tree built again if Rebuilt came
◆ on() [1/5]
\( a_h \gets \mathit{to} \)
◆ on() [2/5]
◆ on() [3/5]
◆ on() [4/5]
◆ on() [5/5]
the tree forgotten, built again at the next query
◆ prefix()
◆ range()
the range \( a_l \oplus \cdots \oplus a_{r-1} \)
- Precondition
- \( l \le r \le n \)
◆ rebuild()
template<Monoid G>
template<class A>
requires requires( const A & a ) { { a.values() } -> std::same_as< const std::vector< Value > & >; }
the tree built again from the array \( a \), whose vector of values a.values() it reads from now on when Rebuilt comes
◆ size()
◆ tree()
The documentation for this class was generated from the following file: