\hypertarget{algorithm_8h}{}\doxysection{kblib/algorithm.h File Reference} \label{algorithm_8h}\index{kblib/algorithm.h@{kblib/algorithm.h}} Provides general-\/purpose algorithms, similar to the $<$algorithms$>$ header. {\ttfamily \#include \char`\"{}tdecl.\+h\char`\"{}}\newline {\ttfamily \#include \char`\"{}iterators.\+h\char`\"{}}\newline {\ttfamily \#include \char`\"{}traits.\+h\char`\"{}}\newline {\ttfamily \#include $<$algorithm$>$}\newline {\ttfamily \#include $<$cmath$>$}\newline {\ttfamily \#include $<$tuple$>$}\newline Include dependency graph for algorithm.\+h\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{algorithm_8h__incl} \end{center} \end{figure} This graph shows which files directly or indirectly include this file\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{algorithm_8h__dep__incl} \end{center} \end{figure} \doxysubsection*{Classes} \begin{DoxyCompactItemize} \item struct \mbox{\hyperlink{structkblib_1_1equivalent}{kblib\+::equivalent$<$ Compare, Obj $>$}} \begin{DoxyCompactList}\small\item\em A function object implementing the equivalence relationship over a comparison predicate. \end{DoxyCompactList}\item struct \mbox{\hyperlink{structkblib_1_1equivalent_3_01void_00_01_obj_01_4}{kblib\+::equivalent$<$ void, Obj $>$}} \item struct \mbox{\hyperlink{structkblib_1_1equivalent_3_01_compare_00_01void_01_4}{kblib\+::equivalent$<$ Compare, void $>$}} \item struct \mbox{\hyperlink{structkblib_1_1equivalent_3_01void_00_01void_01_4}{kblib\+::equivalent$<$ void, void $>$}} \item struct \mbox{\hyperlink{structkblib_1_1is__optional}{kblib\+::is\+\_\+optional$<$ T $>$}} \item struct \mbox{\hyperlink{structkblib_1_1is__optional_3_01std_1_1optional_3_01_u_01_4_01_4}{kblib\+::is\+\_\+optional$<$ std\+::optional$<$ U $>$ $>$}} \end{DoxyCompactItemize} \doxysubsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \mbox{\hyperlink{namespacekblib}{kblib}} \begin{DoxyCompactList}\small\item\em The main namespace in which all entities from kblib are defined. \end{DoxyCompactList}\item namespace \mbox{\hyperlink{namespacekblib_1_1detail__algorithm}{kblib\+::detail\+\_\+algorithm}} \end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item {\footnotesize template$<$typename Callable $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_afc6af3c7ee821bb25dd692bd2fc92adb}{kblib\+::repeat}} (std\+::size\+\_\+t N, Callable func) noexcept(noexcept(func())) -\/$>$ return\+\_\+assert\+\_\+t$<$ is\+\_\+invocable$<$ Callable $>$\+::value, void $>$ \begin{DoxyCompactList}\small\item\em Invoke a function N times. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename Elem $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aa760b40ea7f60976c66be6d77345317b}{kblib\+::erase}} (Container \&c, const Elem \&val) noexcept(noexcept(c.\+erase(std\+::remove(c.\+begin(), c.\+end(), val), c.\+end()))) -\/$>$ void \begin{DoxyCompactList}\small\item\em Abbreviation of the erase-\/remove idiom as a free function. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aa1240cf764c5182f37ab5b5051f90b40}{kblib\+::erase\+\_\+if}} (Container \&c, Unary\+Predicate p) noexcept(noexcept(c.\+erase(std\+::remove\+\_\+if(c.\+begin(), c.\+end(), std\+::ref(p)), c.\+end()))) -\/$>$ void \begin{DoxyCompactList}\small\item\em Abbreviation of the erase-\/remove idiom as a free function. \end{DoxyCompactList}\item {\footnotesize template$<$typename Obj $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a69f8d0752435e17b0c99ece2a5b599bb}{kblib\+::equals}} (const Obj \&a, const Obj \&b) noexcept(noexcept(a$<$ b)) -\/$>$ bool \begin{DoxyCompactList}\small\item\em Synthesize an equivalence relation from \texorpdfstring{$<$}{<}. \end{DoxyCompactList}\item {\footnotesize template$<$typename Obj , typename Compare $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a20a98aa6b6876ad518d999ed85864a85}{kblib\+::equals}} (const Obj \&a, const Obj \&b, Compare comp) noexcept(noexcept(comp(a, b))) -\/$>$ bool \begin{DoxyCompactList}\small\item\em Synthesize an equivalence relation from comp. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_abedf2e5c556e6ab3ebb779227172a2ac}{kblib\+::accumulate}} (Input\+It first, Input\+It last, T init) -\/$>$ T \begin{DoxyCompactList}\small\item\em A constexpr version of std\+::accumulate. \end{DoxyCompactList}\item {\footnotesize template$<$class Input\+It , class T , class Binary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a144f3d9a7e4b619bc53fbaf5e356c0c2}{kblib\+::accumulate}} (Input\+It first, Input\+It last, T init, Binary\+Operation op) -\/$>$ T \begin{DoxyCompactList}\small\item\em A constexpr version of std\+::accumulate. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ab0380312efcdc59f34b028e698c265dc}{kblib\+::sum}} (Input\+It first, Input\+It last) -\/$>$ std\+::decay\+\_\+t$<$ decltype($\ast$first)$>$ \begin{DoxyCompactList}\small\item\em Sum a range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Binary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ae86453386b48c0a0ad1b43938e4f7022}{kblib\+::sum}} (Input\+It first, Input\+It last, Binary\+Operation op) -\/$>$ std\+::decay\+\_\+t$<$ decltype($\ast$first)$>$ \begin{DoxyCompactList}\small\item\em Fold a range over an operation. \end{DoxyCompactList}\item {\footnotesize template$<$typename Range $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ac8b5f9fd83c3ec829e9ee86c2c7424f1}{kblib\+::sum}} (Range \&\&r) -\/$>$ auto \begin{DoxyCompactList}\small\item\em Sum a range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Output\+It , typename T , typename Binary\+Accumulation , typename Unary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aa51ef49b30290e4d7d6f7201e58560c1}{kblib\+::transform\+\_\+exclusive\+\_\+scan}} (Input\+It first, End\+It last, Output\+It d\+\_\+first, T init, Binary\+Accumulation accum, Unary\+Transform proj) -\/$>$ Output\+It \item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Elem $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_abc7f2ec97efdee8640fe38e73fe1fdad}{kblib\+::find}} (Forward\+It begin, End\+It end, const Elem \&value) noexcept(noexcept($\ast$begin==value)) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Finds a value in range \mbox{[}begin, end). If not found, returns end. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Elem , typename Comp $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a7cb44e374b0d5edb7ebce7e1a4e9862d}{kblib\+::find}} (Forward\+It begin, End\+It end, const Elem \&value, Comp \&\&comp) noexcept(noexcept(comp($\ast$begin, value))) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Finds a value in range \mbox{[}begin, end). If not found, returns end. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a4b49eacc73a9295677cb08d9b7892ff6}{kblib\+::find\+\_\+if}} (Forward\+It begin, End\+It end, Unary\+Predicate \&\&pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Finds the first value in range \mbox{[}begin, end) for which pred returns true. If not found, returns end. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ac30ce90c5b10639c0243952248897b51}{kblib\+::find\+\_\+if\+\_\+not}} (Forward\+It begin, End\+It end, Unary\+Predicate \&\&pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Finds the first value in range \mbox{[}begin, end) for which pred returns false. If not found, returns end. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Elem $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a985430339c0a2e1100d0c77faa47806f}{kblib\+::find\+\_\+last}} (Forward\+It begin, End\+It end, const Elem \&value) noexcept(noexcept($\ast$begin==value)) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Searches a range for the last occurence of a match, and returns an iterator to it. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_afdfe60b4f1096a9f60d07cdfb4b5e427}{kblib\+::find\+\_\+last\+\_\+if}} (Forward\+It begin, End\+It end, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Searches a range for the last element on which a predicate returns true. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a1782641d7170a2ef57145e460fe059be}{kblib\+::find\+\_\+last\+\_\+if\+\_\+not}} (Forward\+It begin, End\+It end, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Searches a range for the last element on which a predicate returns false. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Elem $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a6cc206fcdb4a68b8cb6e393b5039a575}{kblib\+::find\+\_\+in}} (Forward\+It begin, End\+It end, const Elem \&value) noexcept(noexcept($\ast$begin==value)) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the offset of the first ocurrence of v in a range from the beginning. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ae565c2bd3542ecc900319508c4204a0d}{kblib\+::find\+\_\+in\+\_\+if}} (Forward\+It begin, End\+It end, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the offset of the first element for which p returns true. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a104b402a896c7ba42eeb1ba513961cb6}{kblib\+::find\+\_\+in\+\_\+if\+\_\+not}} (Forward\+It begin, End\+It end, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the offset of the first element for which p returns false. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Elem $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_add03c5bc4490749865e16dff9030aa24}{kblib\+::find\+\_\+last\+\_\+in}} (Forward\+It begin, End\+It end, const Elem \&value) noexcept(noexcept($\ast$begin==value)) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the offset of the last ocurrence of v in a range from the beginning. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a45b776be68227a2b794c1345a3101df7}{kblib\+::find\+\_\+last\+\_\+in\+\_\+if}} (Forward\+It begin, End\+It end, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ size\+\_\+t \item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a9b56a7bab2714ec861e909a930030cb6}{kblib\+::find\+\_\+last\+\_\+in\+\_\+if\+\_\+not}} (Forward\+It begin, End\+It end, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$begin))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the offset of the last element for which p returns false. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a4b840bb625a22f5dfd674050892d3be1}{kblib\+::find\+\_\+in}} (const Container \&c, const T \&value) noexcept(noexcept($\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Container $>$ \& $>$()==value)) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the first element in c equal to v and return the position. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ab9d81bc7ce57c24888b9eebce31b596c}{kblib\+::find\+\_\+in\+\_\+if}} (const Container \&c, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Container $>$ \& $>$()))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the first element in c for which p returns true and return the position. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ad66766d83405b85f422894329c1b0762}{kblib\+::find\+\_\+in\+\_\+if\+\_\+not}} (const Container \&c, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Container $>$ \& $>$()))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the first element in c for which p returns false and return the position. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a01ea69026c0c1b4403fd1f9e37bdf104}{kblib\+::find\+\_\+last\+\_\+in}} (const Container \&c, const T \&value) noexcept(noexcept($\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Container $>$ \& $>$()==value)) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the last element in c equal to v and return the position. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a5cf3311b51778825d242cc19ceacc619}{kblib\+::find\+\_\+last\+\_\+in\+\_\+if}} (const Container \&c, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Container $>$ \& $>$()))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the last element in c for which p returns true and return the position. \end{DoxyCompactList}\item {\footnotesize template$<$typename Container , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a7e88ca2c2fc0f9ee0a4731224ba4e0e4}{kblib\+::find\+\_\+last\+\_\+in\+\_\+if\+\_\+not}} (const Container \&c, Unary\+Predicate pred) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(pred, $\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Container $>$ \& $>$()))) -\/$>$ size\+\_\+t \begin{DoxyCompactList}\small\item\em Find the last element in c for which p returns true and return the position. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename Binary\+Predicate = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a85ee751e6068e1e86e93ef1cb34f2d1f}{kblib\+::find\+\_\+match}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, Binary\+Predicate cmp) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value and is\+\_\+invocable$<$ Binary\+Predicate, decltype($\ast$begin1), decltype($\ast$begin2)$>$\+::value, std\+::pair$<$ Input\+It1, Input\+It2 $>$ $>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename End\+It2 , typename Binary\+Predicate = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ae8e1b4d2193bbc1a7bd04aca85cdfe36}{kblib\+::find\+\_\+match}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, End\+It2 end2, Binary\+Predicate cmp) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value and is\+\_\+invocable$<$ Binary\+Predicate, decltype($\ast$begin1), decltype($\ast$begin2)$>$\+::value, std\+::pair$<$ Input\+It1, Input\+It2 $>$ $>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename End\+It2 , typename Binary\+Pred $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a8cdb20ed932413236d054b256207b5e3}{kblib\+::starts\+\_\+with}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, End\+It2 end2, Binary\+Pred pred) -\/$>$ enable\+\_\+if\+\_\+t$<$(is\+\_\+input\+\_\+iterator\+\_\+v$<$ Input\+It1 $>$ and is\+\_\+input\+\_\+iterator\+\_\+v$<$ Input\+It2 $>$) and not(is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Input\+It1 $>$ and is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Input\+It2 $>$), bool $>$ \begin{DoxyCompactList}\small\item\em Checks if a given range starts with a particular subrange. \end{DoxyCompactList}\item {\footnotesize template$<$typename Random\+Access\+It1 , typename Random\+Access\+It2 , typename Binary\+Pred = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aece8787c934d63869d013a3f5e15cc56}{kblib\+::starts\+\_\+with}} (Random\+Access\+It1 begin1, Random\+Access\+It1 end1, Random\+Access\+It2 begin2, Random\+Access\+It2 end2, Binary\+Pred pred=\{\}) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Random\+Access\+It1 $>$ and is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Random\+Access\+It2 $>$, bool $>$ \begin{DoxyCompactList}\small\item\em Checks if a given range starts with a particular subrange. \end{DoxyCompactList}\item {\footnotesize template$<$typename Bidir\+It1 , typename Bidir\+It2 , typename Binary\+Pred = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a86b688283b8d950e84631a29f2351c77}{kblib\+::ends\+\_\+with}} (Bidir\+It1 begin1, Bidir\+It1 end1, Bidir\+It2 begin2, Bidir\+It2 end2, Binary\+Pred pred=\{\}) -\/$>$ enable\+\_\+if\+\_\+t$<$(is\+\_\+bidirectional\+\_\+iterator\+\_\+v$<$ Bidir\+It1 $>$ and is\+\_\+bidirectional\+\_\+iterator\+\_\+v$<$ Bidir\+It2 $>$) and not(is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Bidir\+It1 $>$ and is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Bidir\+It2 $>$), bool $>$ \begin{DoxyCompactList}\small\item\em Checks if a given range ends with a particular subrange. \end{DoxyCompactList}\item {\footnotesize template$<$typename Random\+Access\+It1 , typename Random\+Access\+It2 , typename Binary\+Pred = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a72257d3086cc368c6314f8013331915e}{kblib\+::ends\+\_\+with}} (Random\+Access\+It1 begin1, Random\+Access\+It1 end1, Random\+Access\+It2 begin2, Random\+Access\+It2 end2, Binary\+Pred pred=\{\}) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Random\+Access\+It1 $>$ and is\+\_\+random\+\_\+access\+\_\+iterator\+\_\+v$<$ Random\+Access\+It2 $>$, bool $>$ \begin{DoxyCompactList}\small\item\em Checks if a given range ends with a particular subrange. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename T , typename Unary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a19c27b7a705228b485f3eec2a0605ba6}{kblib\+::first\+\_\+result}} (Input\+It begin, End\+It end, T def, Unary\+Transform op) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, std\+::decay\+\_\+t$<$ decltype(op($\ast$begin))$>$ $>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename T , typename Binary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a303620c746944b847de94534da396cd0}{kblib\+::first\+\_\+result}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, T def, Binary\+Transform op) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, std\+::decay\+\_\+t$<$ decltype(op($\ast$begin1, $\ast$begin2))$>$ $>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename End\+It2 , typename T , typename Binary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a243dd4c94b862837cbcb3a21fc7c7850}{kblib\+::first\+\_\+result}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, End\+It2 end2, T def, Binary\+Transform op) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, std\+::decay\+\_\+t$<$ decltype(op($\ast$begin1, $\ast$begin2))$>$ $>$ \item {\footnotesize template$<$typename Input\+It , typename End\+It , typename T , typename Unary\+Transform , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a50dd5af1197cf9f384b53fe0ea30eaf8}{kblib\+::first\+\_\+result\+\_\+if}} (Input\+It begin, End\+It end, T def, Unary\+Transform op, Unary\+Predicate ch) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, decltype(op($\ast$begin))$>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename T , typename Binary\+Transform , typename Binary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_afb43a77bbb2f42381d1c241d96fd01ba}{kblib\+::first\+\_\+result\+\_\+if}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, T def, Binary\+Transform op, Binary\+Predicate ch) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, decltype(op($\ast$begin1, $\ast$begin2))$>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename End\+It2 , typename T , typename Binary\+Transform , typename Binary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a416854a4e20de3e66dc94a591b8fd709}{kblib\+::first\+\_\+result\+\_\+if}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, End\+It2 end2, T def, Binary\+Transform op, Binary\+Predicate ch) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, decltype(op($\ast$begin1, $\ast$begin2))$>$ \item {\footnotesize template$<$typename Input\+It , typename End\+It , typename T , typename Unary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aedb8bdb7d08d66f5896e94ea33e93ebb}{kblib\+::first\+\_\+result\+\_\+opt}} (Input\+It begin, End\+It end, T def, Unary\+Transform op) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, std\+::decay\+\_\+t$<$ decltype(op($\ast$begin))$>$ $>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename T , typename Binary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ae59131730a066402fc31c3ace96fcc59}{kblib\+::first\+\_\+result\+\_\+opt}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, T def, Binary\+Transform op) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, std\+::decay\+\_\+t$<$ decltype(op($\ast$begin1, $\ast$begin2))$>$ $>$ \item {\footnotesize template$<$typename Input\+It1 , typename End\+It1 , typename Input\+It2 , typename End\+It2 , typename T , typename Binary\+Transform $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a726214edec4457179f1a8261c9987a28}{kblib\+::first\+\_\+result\+\_\+opt}} (Input\+It1 begin1, End\+It1 end1, Input\+It2 begin2, End\+It2 end2, T def, Binary\+Transform op) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, std\+::decay\+\_\+t$<$ decltype(op($\ast$begin1, $\ast$begin2))$>$ $>$ \item {\footnotesize template$<$typename Input\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ab437bea5ac232c0a681f8bb1d3754170}{kblib\+::all\+\_\+of}} (Input\+It begin, Input\+It end, Unary\+Predicate pred) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if pred is true for every element of the range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Range , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a3a1a48159ee73f9c98ad2665c3fd4079}{kblib\+::all\+\_\+of}} (Range \&\&rng, Unary\+Predicate pred) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+iterable$<$ Range $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if pred is true for every element of the range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aad79cff7fa01a4ed3d85b83b419cab08}{kblib\+::none\+\_\+of}} (Input\+It begin, Input\+It end, Unary\+Predicate pred) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if pred is false for every element of the range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Range , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ae58938274f29202b1a8c9b07f98ed912}{kblib\+::none\+\_\+of}} (Range \&\&rng, Unary\+Predicate pred) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+iterable$<$ Range $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if pred is true for every element of the range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a2696df0185d20ec1445d22247e259ab1}{kblib\+::any\+\_\+of}} (Input\+It begin, Input\+It end, Unary\+Predicate pred) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if pred is true for at least one element of the range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Range , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a16a5842f4404c27f10371190be51bf49}{kblib\+::any\+\_\+of}} (Range \&\&rng, Unary\+Predicate pred) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+iterable$<$ Range $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if pred is true for every element of the range. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Value $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{kblib\+::contains}} (Input\+It begin, Input\+It end, const Value \&val) noexcept(noexcept($\ast$begin==val)) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if a range contains a value. \end{DoxyCompactList}\item {\footnotesize template$<$typename Set , typename Value $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a0188bc62243d7008096fd565fb6b2e83}{kblib\+::contains}} (const Set \&set, const Value \&val) noexcept(noexcept($\ast$std\+::declval$<$ iterator\+\_\+type\+\_\+for\+\_\+t$<$ const Set $>$ \& $>$()==val)) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+iterable$<$ Set $>$\+::value, bool $>$ \begin{DoxyCompactList}\small\item\em Determine if a range contains a value. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It1 , typename Input\+It2 $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a906cc73872a93e33b3ce8a3a66319012}{kblib\+::contains\+\_\+any}} (Input\+It1 begin, Input\+It1 end, Input\+It2 n\+\_\+begin, Input\+It2 n\+\_\+end) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It1 $>$\+::value and is\+\_\+input\+\_\+iterator$<$ Input\+It2 $>$\+::value, bool $>$ \item {\footnotesize template$<$typename Input\+It , typename Range2 $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a6de3ee39cfc6317455f5035a014d024c}{kblib\+::contains\+\_\+any}} (Input\+It begin, Input\+It end, Range2 \&\&needle) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+input\+\_\+iterator$<$ Input\+It $>$\+::value and is\+\_\+iterable$<$ Range2 $>$\+::value, bool $>$ \item {\footnotesize template$<$typename Range1 , typename Range2 $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ab4a3305951b7977f071de23396e980bc}{kblib\+::contains\+\_\+any}} (Range1 \&\&haystack, Range2 \&\&needle) -\/$>$ enable\+\_\+if\+\_\+t$<$ is\+\_\+iterable$<$ Range1 $>$\+::value and is\+\_\+iterable$<$ Range2 $>$\+::value, bool $>$ \item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Compare = std\+::less$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a85f026b89c516de43393ab0259c1c834}{kblib\+::max\+\_\+element}} (Forward\+It first, End\+It last, Compare comp=\{\}) -\/$>$ Forward\+It \item {\footnotesize template$<$typename Sequence\+Container , typename Comp = std\+::less$<$$>$, typename It , enable\+\_\+if\+\_\+t$<$ is\+\_\+linear\+\_\+container\+\_\+v$<$ Sequence\+Container $>$, int $>$ = 0$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a774bfbeef759d1bbedb5908f1348591b}{kblib\+::get\+\_\+max\+\_\+n\+\_\+old}} (It first, It last, std\+::size\+\_\+t count, Comp cmp=\{\}) -\/$>$ Sequence\+Container \begin{DoxyCompactList}\small\item\em Returns a container of the greatest count elements according to cmp of the range \mbox{[}first, last), in arbitrary order. This overload works for linear containers. \end{DoxyCompactList}\item {\footnotesize template$<$typename Sequence\+Container , typename Comp = std\+::less$<$$>$, typename It , enable\+\_\+if\+\_\+t$<$ is\+\_\+linear\+\_\+container\+\_\+v$<$ Sequence\+Container $>$, int $>$ = 0$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a73a566130ecb9a7b37b0db0952a53404}{kblib\+::get\+\_\+max\+\_\+n}} (It first, It last, std\+::size\+\_\+t count, Comp cmp=\{\}) -\/$>$ Sequence\+Container \begin{DoxyCompactList}\small\item\em Returns a container of the greatest count elements according to cmp of the range \mbox{[}first, last), in descending order. This overload works for linear containers. \end{DoxyCompactList}\item {\footnotesize template$<$typename Comp = std\+::less$<$$>$, typename Input\+It , typename Output\+It , typename Elem = typename std\+::iterator\+\_\+traits$<$\+Input\+It$>$\+::value\+\_\+type$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a07a1e3d300beb263772b5fd079e5d029}{kblib\+::get\+\_\+max\+\_\+n}} (Input\+It first, Input\+It last, Output\+It d\+\_\+begin, std\+::size\+\_\+t count, Comp cmp=\{\}) -\/$>$ return\+\_\+assert\+\_\+t$<$ is\+\_\+output\+\_\+iterator\+\_\+for$<$ Output\+It, Elem $>$\+::value, Output\+It $>$ \begin{DoxyCompactList}\small\item\em Copies the count greatest elements according to cmp of the range \mbox{[}first, last) to the range beginning at d\+\_\+begin. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename End\+It , typename Forward\+It2 , typename Binary\+Function $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a5a3199d9020a07ae387f60a6ef61393b}{kblib\+::for\+\_\+each}} (Forward\+It first, End\+It last, Forward\+It2 second, Binary\+Function f) -\/$>$ Binary\+Function \begin{DoxyCompactList}\small\item\em Applies a binary operation to each pair of corresponding elements in two input ranges. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename Forward\+It2 , typename Size , typename Binary\+Function $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a645d4e1338c54d720c7cb1f8f90a0e59}{kblib\+::for\+\_\+each\+\_\+n}} (Forward\+It first, Size n, Forward\+It2 second, Binary\+Function f) -\/$>$ std\+::pair$<$ Forward\+It, Forward\+It2 $>$ \begin{DoxyCompactList}\small\item\em Applies a binary operation to each pair of corresponding elements in two input ranges. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Output\+It $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ac912dd210d34963da9bd40a1a6296308}{kblib\+::copy}} (Input\+It first, End\+It last, Output\+It out) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Copies all elements of \mbox{[}{\ttfamily first}, {\ttfamily last}) to out. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Output\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a5e6f2b40f2b5e649d70df34e5bcc03fe}{kblib\+::copy\+\_\+if}} (Input\+It first, End\+It last, Output\+It out, Unary\+Predicate pred) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Copies those elements of \mbox{[}{\ttfamily first}, {\ttfamily last}) which satisfy pred to out. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Size , typename Output\+It $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a428621582602281bc8643b3e6830e2d4}{kblib\+::copy\+\_\+n}} (Input\+It first, Size count, Output\+It out) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Copies all elements of \mbox{[}{\ttfamily first}, {\ttfamily std\+::advance(first, n)}) to out. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Size , typename Output\+It , typename Unary\+Predicate $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ab3f36a456830c5c88673a6df70828978}{kblib\+::copy\+\_\+n\+\_\+if}} (Input\+It first, Size count, Output\+It out, Unary\+Predicate pred) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Copies those elements of \mbox{[}{\ttfamily first}, {\ttfamily std\+::advance(first, n)}) which satisfy pred to out. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Output\+It , typename Unary\+Predicate , typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a3a46a1cf64ac97bdc6b5d7fe0571f38f}{kblib\+::replace\+\_\+copy\+\_\+if}} (Input\+It first, End\+It last, Output\+It out, Unary\+Predicate pred, const T \&new\+\_\+value) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Copies an input range, but every element for which pred is true is replaced by new\+\_\+value. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename Size , typename Output\+It , typename Unary\+Predicate , typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aaabe9f5328918c0b6e44df29782e7ae1}{kblib\+::replace\+\_\+copy\+\_\+n\+\_\+if}} (Input\+It first, Size count, Output\+It out, Unary\+Predicate pred, const T \&new\+\_\+value) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Copies an input range, but every element for which pred is true is replaced by new\+\_\+value. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It1 , typename Forward\+It2 , typename Forward\+It3 , typename Output\+It , typename Binary\+Predicate = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ac237e40dd9be6a60c18b9b520b51e111}{kblib\+::search\+\_\+replace\+\_\+copy}} (Forward\+It1 h\+\_\+begin, Forward\+It1 h\+\_\+end, Forward\+It2 n\+\_\+begin, Forward\+It2 n\+\_\+end, Forward\+It3 r\+\_\+begin, Forward\+It3 r\+\_\+end, Output\+It d\+\_\+begin, Binary\+Predicate Compare=\{\}) -\/$>$ Output\+It \item {\footnotesize template$<$typename Haystack , typename Needle , typename Replacement , typename Output\+It , typename Binary\+Predicate = std\+::equal\+\_\+to$<$$>$$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_abffc089ff2fee6d19613dc39cd47cfb5}{kblib\+::search\+\_\+replace\+\_\+copy}} (Haystack \&\&haystack, Needle \&\&needle, Replacement \&\&replacement, Output\+It d\+\_\+begin, Binary\+Predicate compare=\{\}) \item {\footnotesize template$<$class Forward\+It $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_abe51624618b4a7c9f20e295b8c89bf47}{kblib\+::rotate}} (Forward\+It first, Forward\+It n\+\_\+first, Forward\+It last) noexcept(noexcept(swap($\ast$first, $\ast$first))) -\/$>$ Forward\+It \begin{DoxyCompactList}\small\item\em Rotates the input range. This is just a constexpr-\/in-\/\+C++14 version of std\+::rotate. \end{DoxyCompactList}\item {\footnotesize template$<$typename Output\+It , typename End\+It , typename Generator $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a33f20e37682017226d1d7a7128915ea5}{kblib\+::generate}} (Output\+It first, End\+It last, Generator g) noexcept(noexcept($\ast$++first=g())) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Like std\+::generate except that it returns the output iterator at the end. It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Output\+It , typename Size , typename Generator $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a44de39f5ab34ae1bf5b037eb11155caa}{kblib\+::generate\+\_\+n}} (Output\+It first, Size count, Generator g) noexcept(noexcept($\ast$first++=g())) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em Like std\+::generate\+\_\+n except that it is constexpr. \end{DoxyCompactList}\item {\footnotesize template$<$typename Forward\+It , typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a40d0e463984f5ab01f6db106dbad9fb0}{kblib\+::iota}} (Forward\+It first, Forward\+It last, T value) noexcept(noexcept($\ast$first++=value) and noexcept(++value)) -\/$>$ void \item {\footnotesize template$<$typename Forward\+It , typename T , typename Unary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aae9af72a825beb17613b2754bbaca9cc}{kblib\+::iota}} (Forward\+It first, Forward\+It last, T value, Unary\+Operation unary\+\_\+op) noexcept(noexcept($\ast$first++=value) and noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}(unary\+\_\+op, std\+::move(value)))) -\/$>$ void \item {\footnotesize template$<$typename Input\+It , typename End\+It , typename... Params$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a00c98fe410dfc13b00832ecf0293eac9}{kblib\+::call\+\_\+each}} (Input\+It first, End\+It last, Params \&\&... params) noexcept(noexcept(\mbox{\hyperlink{namespacekblib_a9b10acd2ddaea118b990e1177f626722}{kblib\+::invoke}}($\ast$first++, std\+::forward$<$ Params $>$(params)...))) -\/$>$ Input\+It \item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Output\+It , typename Unary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aff53cc55f02129e6192d7a87c7cdf7f0}{kblib\+::transform}} (Input\+It first, End\+It last, Output\+It d\+\_\+first, Unary\+Operation unary\+\_\+op) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em transform applies the given function to a range and stores the result in another range, beginning at d\+\_\+first. The unary operation unary\+\_\+op is applied to the range defined by \mbox{[}first1, last1). It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Input\+It2 , typename Output\+It , typename Binary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_aec3f0154a30d5459c15d1984f137644c}{kblib\+::transform}} (Input\+It first, End\+It last, Input\+It first2, Output\+It d\+\_\+first, Binary\+Operation binary\+\_\+op) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em transform applies the given function to a range and stores the result in another range, beginning at d\+\_\+first. The unary operation unary\+\_\+op is applied to the range defined by \mbox{[}first1, last1). It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$typename Input\+It , typename End\+It , typename Output\+It , typename Unary\+Predicate , typename Unary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a09ef1e721a1b15383c199c67339aaa10}{kblib\+::transform\+\_\+if}} (Input\+It first, End\+It last, Output\+It d\+\_\+first, Unary\+Predicate pred, Unary\+Operation unary\+\_\+op) -\/$>$ Output\+It \begin{DoxyCompactList}\small\item\em transform applies the given function to a range and stores the result in another range, beginning at d\+\_\+first. The unary operation unary\+\_\+op is applied to the range defined by \mbox{[}first1, last1). It also allows for a sentinel end iterator. \end{DoxyCompactList}\item {\footnotesize template$<$class Forward\+It $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_1_1detail__algorithm_a7e9dcc6ba8db08f7ca672ea9f6f20f5a}{kblib\+::detail\+\_\+algorithm\+::shift\+\_\+backward}} (Forward\+It first, Forward\+It n\+\_\+first, Forward\+It last) noexcept(noexcept($\ast$first=std\+::move($\ast$first))) -\/$>$ void \begin{DoxyCompactList}\small\item\em Implementation function for insertion\+\_\+sort\+\_\+copy. Like std\+::move(begin, end, d\+\_\+begin) but using the interface of rotate and supporting backward overlapping, but not forward overlapping. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} Provides general-\/purpose algorithms, similar to the $<$algorithms$>$ header. \begin{DoxyAuthor}{Author} killerbee \end{DoxyAuthor} \begin{DoxyDate}{Date} 2019-\/2021 \end{DoxyDate} \begin{DoxyCopyright}{Copyright} GNU General Public Licence v3.\+0 \end{DoxyCopyright} Definition in file \mbox{\hyperlink{algorithm_8h_source}{algorithm.\+h}}.