ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
SlidingAggregate.h

The aggregate of a sliding window, beyond the book. More...

Files

file  ADS/queue/SlidingAggregate.h
 The aggregate of a sliding window, beyond the book: a QUEUE of values of the monoid G [see Algebra.h] with aggregate(), the combination \( x_1 \oplus \cdots \oplus x_n \) of its values from the front to the back, in \( O( 1 ) \) time per operation, by the algorithm that the algebra and the policy allow (see The aggregate of a sliding window):

Classes

struct  ADS::Amortized
 the policy of a sliding window whose operations cost \( O( 1 ) \) amortized time, by the algorithm that suits the algebra More...
struct  ADS::WorstCase
 the policy of a sliding window whose operations cost \( O( 1 ) \) time in the worst case More...
class  ADS::SlidingAggregate< G, Policy >
 a QUEUE of values of the monoid G with the aggregate of its values, each operation in \( O( 1 ) \) time, amortized or in the worst case by Policy More...

Enumerations

enum class  ADS::window_kind { ADS::window_kind::subtract_on_evict , ADS::window_kind::monotone_deque , ADS::window_kind::two_stacks , ADS::window_kind::real_time }
 the algorithm of a sliding window [see SlidingAggregate] More...

Detailed description

The aggregate of a sliding window, beyond the book.

The definitions, the invariants and the costs of the area are in Theory of queues.

Enumeration type documentation

◆ window_kind

enum class ADS::window_kind
strong

the algorithm of a sliding window [see SlidingAggregate]

Enumerator
subtract_on_evict 
monotone_deque 
two_stacks 
real_time