Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::AddLazyTag< T > Struct Template Reference

Additive lazy tag: adds a delta to every node on a path. More...

#include <tpl_link_cut_tree.H>

Public Types

using tag_type = T
 

Static Public Member Functions

static constexpr T tag_identity () noexcept
 
static constexpr T apply (const T &v, const T &tag, size_t cnt) noexcept
 
static constexpr T compose (const T &a, const T &b) noexcept
 

Detailed Description

template<typename T>
struct Aleph::AddLazyTag< T >

Additive lazy tag: adds a delta to every node on a path.

When combined with SumMonoid, the aggregate of a subtree of cnt nodes increases by tag * cnt. For other monoids the count parameter may be ignored.

Definition at line 243 of file tpl_link_cut_tree.H.

Member Typedef Documentation

◆ tag_type

template<typename T >
using Aleph::AddLazyTag< T >::tag_type = T

Definition at line 245 of file tpl_link_cut_tree.H.

Member Function Documentation

◆ apply()

template<typename T >
static constexpr T Aleph::AddLazyTag< T >::apply ( const T v,
const T tag,
size_t  cnt 
)
inlinestaticconstexprnoexcept

Definition at line 248 of file tpl_link_cut_tree.H.

◆ compose()

template<typename T >
static constexpr T Aleph::AddLazyTag< T >::compose ( const T a,
const T b 
)
inlinestaticconstexprnoexcept

Definition at line 253 of file tpl_link_cut_tree.H.

◆ tag_identity()

template<typename T >
static constexpr T Aleph::AddLazyTag< T >::tag_identity ( )
inlinestaticconstexprnoexcept

Definition at line 246 of file tpl_link_cut_tree.H.


The documentation for this struct was generated from the following file: