|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Classical DP optimization toolkit: D&C DP, Knuth, CHT, Li Chao, and monotone-queue transitions. More...
#include <algorithm>#include <cstddef>#include <limits>#include <numeric>#include <type_traits>#include <utility>#include <ah-errors.H>#include <tpl_array.H>Go to the source code of this file.
Classes | |
| struct | Aleph::Divide_Conquer_DP_Result< Cost > |
| Result of divide-and-conquer partition DP optimization. More... | |
| struct | Aleph::Knuth_Optimization_Result< Cost > |
| Result of Knuth interval-DP optimization. More... | |
| class | Aleph::Convex_Hull_Trick< T > |
| Convex Hull Trick for minimum queries. More... | |
| struct | Aleph::Convex_Hull_Trick< T >::Line |
| Affine line y = m*x + b. More... | |
| class | Aleph::Li_Chao_Tree< T > |
| Li Chao tree for min line queries on an integral x-domain. More... | |
| struct | Aleph::Li_Chao_Tree< T >::Line |
| Affine line y = m*x + b. More... | |
| struct | Aleph::Li_Chao_Tree< T >::Node |
| struct | Aleph::Monotone_Queue_DP_Result< Cost > |
| Result of monotone-queue windowed DP transition. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::dp_optimization_detail |
Typedefs | |
| template<typename T > | |
| using | Aleph::dp_optimization_detail::promoted_t = std::conditional_t< std::is_floating_point_v< T >, T, std::conditional_t<(sizeof(T)< 8), long long, __int128_t > > |
Classical DP optimization toolkit: D&C DP, Knuth, CHT, Li Chao, and monotone-queue transitions.
This header collects optimization patterns that are frequently used to cut asymptotic complexity in dynamic programming recurrences:
Additionally, it includes a geometric utility that applies Li Chao to the lower envelope of parabolas (weighted squared distances on a line).
Definition in file DP_Optimizations.H.