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

Range add + range min policy. More...

#include <tpl_segment_tree.H>

Public Types

using value_type = T
 
using lazy_type = T
 

Public Member Functions

constexpr T value_identity () const noexcept
 

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) noexcept
 
static constexpr T compose (const T &old_lazy, const T &new_lazy) noexcept
 
static constexpr T lazy_identity () noexcept
 

Detailed Description

template<std::totally_ordered T>
struct Aleph::Add_Min_Policy< T >

Range add + range min policy.

Policy for Gen_Lazy_Segment_Tree implementing a segment tree supporting range additions and range minimum queries.

  • combine(a, b) = min(a, b)
  • apply(val, delta, count) = val + delta
  • compose(old, new) = old + new
Template Parameters
Ta totally ordered arithmetic type.

Definition at line 767 of file tpl_segment_tree.H.

Member Typedef Documentation

◆ lazy_type

template<std::totally_ordered T>
using Aleph::Add_Min_Policy< T >::lazy_type = T

Definition at line 770 of file tpl_segment_tree.H.

◆ value_type

template<std::totally_ordered T>
using Aleph::Add_Min_Policy< T >::value_type = T

Definition at line 769 of file tpl_segment_tree.H.

Member Function Documentation

◆ apply()

template<std::totally_ordered T>
static constexpr T Aleph::Add_Min_Policy< T >::apply ( const T val,
const T delta,
size_t   
)
inlinestaticconstexprnoexcept

Definition at line 777 of file tpl_segment_tree.H.

◆ combine()

template<std::totally_ordered T>
static constexpr T Aleph::Add_Min_Policy< T >::combine ( const T a,
const T b 
)
inlinestaticconstexprnoexcept

Definition at line 772 of file tpl_segment_tree.H.

◆ compose()

template<std::totally_ordered T>
static constexpr T Aleph::Add_Min_Policy< T >::compose ( const T old_lazy,
const T new_lazy 
)
inlinestaticconstexprnoexcept

Definition at line 783 of file tpl_segment_tree.H.

References Aleph::divide_and_conquer_partition_dp().

◆ lazy_identity()

template<std::totally_ordered T>
static constexpr T Aleph::Add_Min_Policy< T >::lazy_identity ( )
inlinestaticconstexprnoexcept

Definition at line 794 of file tpl_segment_tree.H.

◆ value_identity()

template<std::totally_ordered T>
constexpr T Aleph::Add_Min_Policy< T >::value_identity ( ) const
inlineconstexprnoexcept

Definition at line 789 of file tpl_segment_tree.H.


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