Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Namespaces | Functions
algorithm.hpp File Reference
#include <algorithm>
#include <functional>
Include dependency graph for algorithm.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ext
 

Functions

template<class InputIt1 , class InputIt2 , class Compare >
bool ext::excludes (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Compare comp)
 Tests two sorted ranges wheter all elements from the second are not present in the first. More...
 
template<class InputIt1 , class InputIt2 >
bool ext::excludes (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
 Tests two sorted ranges wheter all elements from the second are not present in the first. More...
 
template<class InputIterator1 , class InputIterator2 , class OutputIterator1 , class OutputIterator2 , class Compare >
void ext::set_symmetric_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator1 result1, OutputIterator2 result2, Compare comp)
 Constructs sorted ranges beginning in the location pointed by result1 and result2 with the set differences of the two sorted ranges [first1,last1) and [first2,last2). More...
 
template<class InputIterator1 , class InputIterator2 , class OutputIterator1 , class OutputIterator2 >
void ext::set_symmetric_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator1 result1, OutputIterator2 result2)
 Constructs sorted ranges beginning in the location pointed by result1 and result2 with the set differences of the two sorted ranges [first1,last1) and [first2,last2). More...
 
template<class ResType , class InType , typename ... Ts, template< typename ... > class ContainerType, class Callback >
ContainerType< ResType > ext::transform (const ContainerType< InType, Ts ... > &in, Callback transform)
 In container tranformation of all elements according to the tranform. More...
 
template<class InputIt , class Element >
bool ext::contains (InputIt first, InputIt last, const Element &elem)
 Linear version of search in a range of values. More...
 
template<class InputIt , class Element >
bool ext::binary_contains (InputIt first, InputIt last, const Element &elem)
 Logaritmic version of search in a range of sorted values. More...
 
template<class Iterator , class Value >
std::pair< Iterator, Iterator > ext::find_range_internal (Iterator begin, Iterator end, const Value &open, const Value &close)
 Function to locate pair of iterators (openPos, closePos), i.e. both openPos and closePos are included in the range, where * openPos == open and closePos == closePos, or openPos = closePos = begin if no range can be found. More...
 
template<class Iterator , class Value >
std::pair< Iterator, Iterator > ext::find_range (Iterator begin, Iterator end, const Value &open, const Value &close)
 Function to locate pair of iterators (openPos, closePos] where * openPos == open and closePos == closePos, or openPos = closePos = begin if no range can be found. More...
 
template<typename T >
constexpr const T & ext::max (const T &a)
 Root case of maximum computation. The maximum from one value is the value itself. More...
 
template<typename T , typename ... Args>
constexpr const T & ext::max (const T &a, const T &b, const Args &... args)
 Root case of maximum computation. The maximum from one value is the value itself. More...
 
template<typename T >
constexpr const T & ext::min (const T &a)
 
template<typename T , typename ... Args>
constexpr const T & ext::min (const T &a, const T &b, const Args &... args)
 Root case of minimum computation. The minimum from one value is the value itself. More...
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator ext::adjacent_find_internal (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred)
 Internal function of standard library. More...
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator ext::unique_internal (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred)
 Internal function of standard library tuned to handle swapping of pointers. More...
 
template<typename ForwardIterator >
ForwardIterator ext::unique (ForwardIterator first, ForwardIterator last)
 Shuffles values in a sequece so that consecutive duplicate values are pushed to the front and others to the back. More...
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator ext::unique (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred)
 Shuffles values in a sequece so that consecutive duplicate values are pushed to the front and others to the back. More...
 
template<class ForwardIteratorBegin , class ForwardIteratorEnd , class ForwardCandidateIterator >
bool ext::range_contains_iterator (ForwardIteratorBegin from, const ForwardIteratorEnd &end, const ForwardCandidateIterator &candidate)
 determines if iterator candidate is in range [from, to). More...