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

Assignment lazy tag: sets every node on a path to a fixed value. More...

#include <tpl_link_cut_tree.H>

Classes

struct  tag_type
 Payload for the assignment lazy tag. More...
 

Static Public Member Functions

static constexpr tag_type tag_identity () noexcept
 
static constexpr T apply (const T &v, const tag_type &tag, size_t cnt) noexcept
 
static constexpr tag_type compose (const tag_type &existing, const tag_type &newer) noexcept
 

Detailed Description

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

Assignment lazy tag: sets every node on a path to a fixed value.

Designed for use with SumMonoid. When assigning value v to a subtree of cnt nodes, the aggregate becomes v * cnt.

Note
For MinMonoid / MaxMonoid the aggregate after assignment is simply the assigned value (all nodes are equal). Write a custom tag in that case.

Definition at line 269 of file tpl_link_cut_tree.H.

Member Function Documentation

◆ apply()

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

Definition at line 285 of file tpl_link_cut_tree.H.

◆ compose()

template<typename T >
static constexpr tag_type Aleph::AssignLazyTag< T >::compose ( const tag_type existing,
const tag_type newer 
)
inlinestaticconstexprnoexcept

◆ tag_identity()

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

Definition at line 283 of file tpl_link_cut_tree.H.


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