Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::SegmentTreeOp Concept Reference

Binary operation compatible with Segment Tree queries. More...

#include <tpl_segment_tree.H>

Concept definition

template<typename F, typename T>
requires(const F& f, const T& a, const T& b)
{
{ f(a, b) } -> std::convertible_to<T>;
}
Binary operation compatible with Segment Tree queries.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
std::decay_t< typename HeadC::Item_Type > T
Definition ah-zip.H:105

Detailed Description

Binary operation compatible with Segment Tree queries.

This concept is used by Gen_Segment_Tree to constrain the binary operation passed as template parameter.

Template Parameters
FBinary functor type.
TValue type.
Requirements
  • f(a, b) must be well-formed for const T& a, const T& b.
  • The result must be convertible to T.
Note
This concept only checks the call signature. For correctness of range queries, F must define an associative operation and the caller must provide a correct identity element where required.

Definition at line 100 of file tpl_segment_tree.H.