Embedded Template Library 1.0
algorithm

Functions

template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::min_element (TIterator begin, TIterator end, TCompare compare)
 
template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::min_element (TIterator begin, TIterator end)
 
template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::max_element (TIterator begin, TIterator end, TCompare compare)
 
template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::max_element (TIterator begin, TIterator end)
 
template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< TIterator, TIterator > etl::minmax_element (TIterator begin, TIterator end, TCompare compare)
 
template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< TIterator, TIterator > etl::minmax_element (TIterator begin, TIterator end)
 
template<typename T >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< const T &, const T & > etl::minmax (const T &a, const T &b)
 
template<typename T , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< const T &, const T & > etl::minmax (const T &a, const T &b, TCompare compare)
 
template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::is_sorted_until (TIterator begin, TIterator end)
 
template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::is_sorted_until (TIterator begin, TIterator end, TCompare compare)
 
template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_sorted (TIterator begin, TIterator end)
 
template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_sorted (TIterator begin, TIterator end, TCompare compare)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::find_if_not (TIterator begin, TIterator end, TUnaryPredicate predicate)
 
template<typename TIterator1 , typename TIterator2 >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_permutation (TIterator1 begin1, TIterator1 end1, TIterator2 begin2)
 
template<typename TIterator1 , typename TIterator2 , typename TBinaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_permutation (TIterator1 begin1, TIterator1 end1, TIterator2 begin2, TBinaryPredicate predicate)
 
template<typename TIterator1 , typename TIterator2 >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_permutation (TIterator1 begin1, TIterator1 end1, TIterator2 begin2, TIterator2 end2)
 
template<typename TIterator1 , typename TIterator2 , typename TBinaryPredicate >
ETL_NODISCARD bool etl::is_permutation (TIterator1 begin1, TIterator1 end1, TIterator2 begin2, TIterator2 end2, TBinaryPredicate predicate)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_partitioned (TIterator begin, TIterator end, TUnaryPredicate predicate)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::partition_point (TIterator begin, TIterator end, TUnaryPredicate predicate)
 
template<typename TSource , typename TDestinationTrue , typename TDestinationFalse , typename TUnaryPredicate >
ETL_CONSTEXPR14 ETL_OR_STD::pair< TDestinationTrue, TDestinationFalse > etl::partition_copy (TSource begin, TSource end, TDestinationTrue destination_true, TDestinationFalse destination_false, TUnaryPredicate predicate)
 
template<typename TIterator , typename TOutputIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::copy_if (TIterator begin, TIterator end, TOutputIterator out, TUnaryPredicate predicate)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::all_of (TIterator begin, TIterator end, TUnaryPredicate predicate)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::any_of (TIterator begin, TIterator end, TUnaryPredicate predicate)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::none_of (TIterator begin, TIterator end, TUnaryPredicate predicate)
 
template<typename TIterator , typename TCompare >
void etl::sort (TIterator first, TIterator last, TCompare compare)
 
template<typename TIterator >
void etl::sort (TIterator first, TIterator last)
 
template<typename TIterator , typename TCompare >
void etl::stable_sort (TIterator first, TIterator last, TCompare compare)
 
template<typename TIterator >
void etl::stable_sort (TIterator first, TIterator last)
 
template<typename TIterator , typename T >
ETL_CONSTEXPR14 T etl::accumulate (TIterator first, TIterator last, T sum)
 
template<typename TIterator , typename T , typename TBinaryOperation >
ETL_CONSTEXPR14 T etl::accumulate (TIterator first, TIterator last, T sum, TBinaryOperation operation)
 
template<typename T , typename TCompare >
ETL_CONSTEXPR const T & etl::clamp (const T &value, const T &low, const T &high, TCompare compare)
 
template<typename TIterator , typename T >
ETL_CONSTEXPR14 TIterator etl::remove (TIterator first, TIterator last, const T &value)
 
template<typename TIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TIterator etl::remove_if (TIterator first, TIterator last, TUnaryPredicate predicate)
 
template<typename TInputIterator , typename TOutputIterator >
ETL_CONSTEXPR14 etl::enable_if< etl::is_random_iterator< TInputIterator >::value &&etl::is_random_iterator< TOutputIterator >::value, TOutputIterator >::type etl::copy_s (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TOutputIterator o_end)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator >
ETL_CONSTEXPR14 TOutputIterator etl::copy_n_s (TInputIterator i_begin, TSize n, TOutputIterator o_begin, TOutputIterator o_end)
 
template<typename TInputIterator , typename TSize1 , typename TOutputIterator , typename TSize2 >
ETL_CONSTEXPR14 TOutputIterator etl::copy_n_s (TInputIterator i_begin, TSize1 n1, TOutputIterator o_begin, TSize2 n2)
 
template<typename TInputIterator , typename TOutputIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::copy_if_s (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TOutputIterator o_end, TUnaryPredicate predicate)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::copy_n_if (TInputIterator i_begin, TSize n, TOutputIterator o_begin, TUnaryPredicate predicate)
 
template<typename TInputIterator , typename TOutputIterator >
TOutputIterator etl::move_s (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TOutputIterator o_end)
 
template<typename TIterator , typename TValue >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::binary_find (TIterator begin, TIterator end, const TValue &value)
 
template<typename TIterator , typename TValue , typename TBinaryPredicate , typename TBinaryEquality >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::binary_find (TIterator begin, TIterator end, const TValue &value, TBinaryPredicate predicate, TBinaryEquality equality)
 
template<typename TIterator , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TUnaryFunction etl::for_each_if (TIterator begin, const TIterator end, TUnaryFunction function, TUnaryPredicate predicate)
 
template<typename TIterator , typename TSize , typename TUnaryFunction >
ETL_CONSTEXPR14 TIterator etl::for_each_n (TIterator begin, TSize n, TUnaryFunction function)
 
template<typename TIterator , typename TSize , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TIterator etl::for_each_n_if (TIterator begin, TSize n, TUnaryFunction function, TUnaryPredicate predicate)
 
template<typename TInputIterator , typename TOutputIterator , typename TUnaryFunction >
ETL_CONSTEXPR14 TOutputIterator etl::transform_s (TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TOutputIterator o_end, TUnaryFunction function)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TUnaryFunction >
ETL_CONSTEXPR14 void etl::transform_n (TInputIterator i_begin, TSize n, TOutputIterator o_begin, TUnaryFunction function)
 
template<typename TInputIterator1 , typename TInputIterator2 , typename TSize , typename TOutputIterator , typename TBinaryFunction >
ETL_CONSTEXPR14 void etl::transform_n (TInputIterator1 i_begin1, TInputIterator2 i_begin2, TSize n, TOutputIterator o_begin, TBinaryFunction function)
 
template<typename TInputIterator , typename TOutputIterator , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_if (TInputIterator i_begin, const TInputIterator i_end, TOutputIterator o_begin, TUnaryFunction function, TUnaryPredicate predicate)
 
template<typename TInputIterator1 , typename TInputIterator2 , typename TOutputIterator , typename TBinaryFunction , typename TBinaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_if (TInputIterator1 i_begin1, const TInputIterator1 i_end1, TInputIterator2 i_begin2, TOutputIterator o_begin, TBinaryFunction function, TBinaryPredicate predicate)
 
template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_n_if (TInputIterator i_begin, TSize n, TOutputIterator o_begin, TUnaryFunction function, TUnaryPredicate predicate)
 
template<typename TInputIterator1 , typename TInputIterator2 , typename TSize , typename TOutputIterator , typename TBinaryFunction , typename TBinaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_n_if (TInputIterator1 i_begin1, TInputIterator2 i_begin2, TSize n, TOutputIterator o_begin, TBinaryFunction function, TBinaryPredicate predicate)
 
template<typename TSource , typename TDestinationTrue , typename TDestinationFalse , typename TUnaryFunctionTrue , typename TUnaryFunctionFalse , typename TUnaryPredicate >
ETL_CONSTEXPR14 ETL_OR_STD::pair< TDestinationTrue, TDestinationFalse > etl::partition_transform (TSource begin, TSource end, TDestinationTrue destination_true, TDestinationFalse destination_false, TUnaryFunctionTrue function_true, TUnaryFunctionFalse function_false, TUnaryPredicate predicate)
 
template<typename TSource1 , typename TSource2 , typename TDestinationTrue , typename TDestinationFalse , typename TBinaryFunctionTrue , typename TBinaryFunctionFalse , typename TBinaryPredicate >
ETL_CONSTEXPR14 ETL_OR_STD::pair< TDestinationTrue, TDestinationFalse > etl::partition_transform (TSource1 begin1, TSource1 end1, TSource2 begin2, TDestinationTrue destination_true, TDestinationFalse destination_false, TBinaryFunctionTrue function_true, TBinaryFunctionFalse function_false, TBinaryPredicate predicate)
 
template<typename TIterator , typename TCompare >
ETL_CONSTEXPR20 void etl::shell_sort (TIterator first, TIterator last, TCompare compare)
 
template<typename TIterator >
ETL_CONSTEXPR20 void etl::shell_sort (TIterator first, TIterator last)
 
template<typename TIterator , typename TCompare >
ETL_CONSTEXPR14 void etl::insertion_sort (TIterator first, TIterator last, TCompare compare)
 
template<typename TIterator >
ETL_CONSTEXPR14 void etl::insertion_sort (TIterator first, TIterator last)
 
template<typename TIterator , typename TCompare >
ETL_CONSTEXPR20 void etl::selection_sort (TIterator first, TIterator last, TCompare compare)
 
template<typename TIterator >
ETL_CONSTEXPR20 void etl::selection_sort (TIterator first, TIterator last)
 
template<typename TIterator , typename TCompare >
ETL_CONSTEXPR14 void etl::heap_sort (TIterator first, TIterator last, TCompare compare)
 
template<typename TIterator >
ETL_CONSTEXPR14 void etl::heap_sort (TIterator first, TIterator last)
 

Detailed Description

Including reverse engineered algorithms from C++ 0x11, 0x14, 0x17 Additional new variants of certain algorithms.

Function Documentation

◆ accumulate() [1/2]

template<typename TIterator , typename T >
ETL_CONSTEXPR14 T etl::accumulate ( TIterator  first,
TIterator  last,
sum 
)

Accumulates values.

◆ accumulate() [2/2]

template<typename TIterator , typename T , typename TBinaryOperation >
ETL_CONSTEXPR14 T etl::accumulate ( TIterator  first,
TIterator  last,
sum,
TBinaryOperation  operation 
)

Accumulates values.

◆ all_of()

template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::all_of ( TIterator  begin,
TIterator  end,
TUnaryPredicate  predicate 
)

all_of

a href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of">

◆ any_of()

template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::any_of ( TIterator  begin,
TIterator  end,
TUnaryPredicate  predicate 
)

any_of

a href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of">

◆ binary_find() [1/2]

template<typename TIterator , typename TValue >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::binary_find ( TIterator  begin,
TIterator  end,
const TValue &  value 
)

binary_find

Does a binary search and returns an iterator to the value or end if not found.

◆ binary_find() [2/2]

template<typename TIterator , typename TValue , typename TBinaryPredicate , typename TBinaryEquality >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::binary_find ( TIterator  begin,
TIterator  end,
const TValue &  value,
TBinaryPredicate  predicate,
TBinaryEquality  equality 
)

binary_find

Does a binary search and returns an iterator to the value or end if not found.

◆ clamp()

template<typename T , typename TCompare >
ETL_CONSTEXPR const T & etl::clamp ( const T &  value,
const T &  low,
const T &  high,
TCompare  compare 
)

Clamp values.

◆ copy_if()

template<typename TIterator , typename TOutputIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::copy_if ( TIterator  begin,
TIterator  end,
TOutputIterator  out,
TUnaryPredicate  predicate 
)

copy_if

a href="http://en.cppreference.com/w/cpp/algorithm/copy">

◆ copy_if_s()

template<typename TInputIterator , typename TOutputIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::copy_if_s ( TInputIterator  i_begin,
TInputIterator  i_end,
TOutputIterator  o_begin,
TOutputIterator  o_end,
TUnaryPredicate  predicate 
)

copy_if A safer form of copy_if where it terminates when the first end iterator is reached. There is currently no STL equivelent.

◆ copy_n_if()

template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::copy_n_if ( TInputIterator  i_begin,
TSize  n,
TOutputIterator  o_begin,
TUnaryPredicate  predicate 
)

copy_n_if Combination of copy_n and copy_if.

◆ copy_n_s() [1/2]

template<typename TInputIterator , typename TSize , typename TOutputIterator >
ETL_CONSTEXPR14 TOutputIterator etl::copy_n_s ( TInputIterator  i_begin,
TSize  n,
TOutputIterator  o_begin,
TOutputIterator  o_end 
)

copy_n A safer form of copy_n where the smallest of the two ranges is used.

◆ copy_n_s() [2/2]

template<typename TInputIterator , typename TSize1 , typename TOutputIterator , typename TSize2 >
ETL_CONSTEXPR14 TOutputIterator etl::copy_n_s ( TInputIterator  i_begin,
TSize1  n1,
TOutputIterator  o_begin,
TSize2  n2 
)

copy_n A safer form of copy_n where the smallest of the two ranges is used.

◆ copy_s()

template<typename TInputIterator , typename TOutputIterator >
ETL_CONSTEXPR14 etl::enable_if< etl::is_random_iterator< TInputIterator >::value &&etl::is_random_iterator< TOutputIterator >::value, TOutputIterator >::type etl::copy_s ( TInputIterator  i_begin,
TInputIterator  i_end,
TOutputIterator  o_begin,
TOutputIterator  o_end 
)

copy_s A safer form of copy where the smallest of the two ranges is used. There is currently no STL equivalent. Specialisation for random access iterators.

Parameters
i_beginBeginning of the input range.
i_endEnd of the input range.
o_beginBeginning of the output range.
o_endEnd of the output range.

◆ find_if_not()

template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::find_if_not ( TIterator  begin,
TIterator  end,
TUnaryPredicate  predicate 
)

find_if_not

a href="http://en.cppreference.com/w/cpp/algorithm/find">

◆ for_each_if()

template<typename TIterator , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TUnaryFunction etl::for_each_if ( TIterator  begin,
const TIterator  end,
TUnaryFunction  function,
TUnaryPredicate  predicate 
)

Like std::for_each but applies a predicate before calling the function.

◆ for_each_n()

template<typename TIterator , typename TSize , typename TUnaryFunction >
ETL_CONSTEXPR14 TIterator etl::for_each_n ( TIterator  begin,
TSize  n,
TUnaryFunction  function 
)

Like std::for_each but for 'n' iterations.

◆ for_each_n_if()

template<typename TIterator , typename TSize , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TIterator etl::for_each_n_if ( TIterator  begin,
TSize  n,
TUnaryFunction  function,
TUnaryPredicate  predicate 
)

Like std::for_each but applies a predicate before calling the function, for 'n' iterations

◆ heap_sort() [1/2]

template<typename TIterator >
ETL_CONSTEXPR14 void etl::heap_sort ( TIterator  first,
TIterator  last 
)

Sorts the elements using heap sort.

◆ heap_sort() [2/2]

template<typename TIterator , typename TCompare >
ETL_CONSTEXPR14 void etl::heap_sort ( TIterator  first,
TIterator  last,
TCompare  compare 
)

Sorts the elements using heap sort. Uses user defined comparison.

◆ insertion_sort() [1/2]

template<typename TIterator >
ETL_CONSTEXPR14 void etl::insertion_sort ( TIterator  first,
TIterator  last 
)

Sorts the elements using insertion sort.

◆ insertion_sort() [2/2]

template<typename TIterator , typename TCompare >
ETL_CONSTEXPR14 void etl::insertion_sort ( TIterator  first,
TIterator  last,
TCompare  compare 
)

Sorts the elements using insertion sort. Uses user defined comparison.

◆ is_partitioned()

template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_partitioned ( TIterator  begin,
TIterator  end,
TUnaryPredicate  predicate 
)

is_partitioned

a href="http://en.cppreference.com/w/cpp/algorithm/is_partitioned">

◆ is_permutation() [1/4]

template<typename TIterator1 , typename TIterator2 >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_permutation ( TIterator1  begin1,
TIterator1  end1,
TIterator2  begin2 
)

is_permutation

a href="http://en.cppreference.com/w/cpp/algorithm/is_permutation">

◆ is_permutation() [2/4]

template<typename TIterator1 , typename TIterator2 , typename TBinaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_permutation ( TIterator1  begin1,
TIterator1  end1,
TIterator2  begin2,
TBinaryPredicate  predicate 
)

is_permutation

a href="http://en.cppreference.com/w/cpp/algorithm/is_permutation">

◆ is_permutation() [3/4]

template<typename TIterator1 , typename TIterator2 >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_permutation ( TIterator1  begin1,
TIterator1  end1,
TIterator2  begin2,
TIterator2  end2 
)

is_permutation

a href="http://en.cppreference.com/w/cpp/algorithm/is_permutation">

◆ is_permutation() [4/4]

template<typename TIterator1 , typename TIterator2 , typename TBinaryPredicate >
ETL_NODISCARD bool etl::is_permutation ( TIterator1  begin1,
TIterator1  end1,
TIterator2  begin2,
TIterator2  end2,
TBinaryPredicate  predicate 
)

is_permutation

a href="http://en.cppreference.com/w/cpp/algorithm/is_permutation">

◆ is_sorted() [1/2]

template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_sorted ( TIterator  begin,
TIterator  end 
)

is_sorted

a href="http://en.cppreference.com/w/cpp/algorithm/is_sorted">

◆ is_sorted() [2/2]

template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::is_sorted ( TIterator  begin,
TIterator  end,
TCompare  compare 
)

is_sorted

a href="http://en.cppreference.com/w/cpp/algorithm/is_sorted">

◆ is_sorted_until() [1/2]

template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::is_sorted_until ( TIterator  begin,
TIterator  end 
)

is_sorted_until

a href="http://en.cppreference.com/w/cpp/algorithm/is_sorted_until">

◆ is_sorted_until() [2/2]

template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::is_sorted_until ( TIterator  begin,
TIterator  end,
TCompare  compare 
)

is_sorted_until

a href="http://en.cppreference.com/w/cpp/algorithm/is_sorted_until">

◆ max_element() [1/2]

template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::max_element ( TIterator  begin,
TIterator  end 
)

max_element

a href="http://en.cppreference.com/w/cpp/algorithm/max_element">

◆ max_element() [2/2]

template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::max_element ( TIterator  begin,
TIterator  end,
TCompare  compare 
)

Finds the iterator to the largest element in the range (begin, end).
a href="http://en.cppreference.com/w/cpp/algorithm/max_element">

◆ min_element() [1/2]

template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::min_element ( TIterator  begin,
TIterator  end 
)

min_element

a href="http://en.cppreference.com/w/cpp/algorithm/min_element">

◆ min_element() [2/2]

template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::min_element ( TIterator  begin,
TIterator  end,
TCompare  compare 
)

Finds the iterator to the smallest element in the range (begin, end).
a href="http://en.cppreference.com/w/cpp/algorithm/min_element">

◆ minmax() [1/2]

template<typename T >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< const T &, const T & > etl::minmax ( const T &  a,
const T &  b 
)

minmax

a href="http://en.cppreference.com/w/cpp/algorithm/minmax">

◆ minmax() [2/2]

template<typename T , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< const T &, const T & > etl::minmax ( const T &  a,
const T &  b,
TCompare  compare 
)

minmax

a href="http://en.cppreference.com/w/cpp/algorithm/minmax">

◆ minmax_element() [1/2]

template<typename TIterator >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< TIterator, TIterator > etl::minmax_element ( TIterator  begin,
TIterator  end 
)

minmax_element

a href="http://en.cppreference.com/w/cpp/algorithm/minmax_element">

◆ minmax_element() [2/2]

template<typename TIterator , typename TCompare >
ETL_NODISCARD ETL_CONSTEXPR14 ETL_OR_STD::pair< TIterator, TIterator > etl::minmax_element ( TIterator  begin,
TIterator  end,
TCompare  compare 
)

Finds the greatest and the smallest element in the range (begin, end).
a href="http://en.cppreference.com/w/cpp/algorithm/minmax_element">

◆ move_s()

template<typename TInputIterator , typename TOutputIterator >
TOutputIterator etl::move_s ( TInputIterator  i_begin,
TInputIterator  i_end,
TOutputIterator  o_begin,
TOutputIterator  o_end 
)

move_s C++03 A safer form of move where the smallest of the two ranges is used. There is currently no STL equivalent. Specialisation for non random access iterators.

Parameters
i_beginBeginning of the input range.
i_endEnd of the input range.
o_beginBeginning of the output range.
o_endEnd of the output range.

◆ none_of()

template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 bool etl::none_of ( TIterator  begin,
TIterator  end,
TUnaryPredicate  predicate 
)

none_of

a href="http://en.cppreference.com/w/cpp/algorithm/all_any_none_of">

◆ partition_copy()

template<typename TSource , typename TDestinationTrue , typename TDestinationFalse , typename TUnaryPredicate >
ETL_CONSTEXPR14 ETL_OR_STD::pair< TDestinationTrue, TDestinationFalse > etl::partition_copy ( TSource  begin,
TSource  end,
TDestinationTrue  destination_true,
TDestinationFalse  destination_false,
TUnaryPredicate  predicate 
)

Copies the elements from the range (begin, end) to two different ranges depending on the value returned by the predicate.
a href="http://en.cppreference.com/w/cpp/algorithm/partition_copy">

◆ partition_point()

template<typename TIterator , typename TUnaryPredicate >
ETL_NODISCARD ETL_CONSTEXPR14 TIterator etl::partition_point ( TIterator  begin,
TIterator  end,
TUnaryPredicate  predicate 
)

partition_point a href="http://en.cppreference.com/w/cpp/algorithm/partition_point">

◆ partition_transform() [1/2]

template<typename TSource , typename TDestinationTrue , typename TDestinationFalse , typename TUnaryFunctionTrue , typename TUnaryFunctionFalse , typename TUnaryPredicate >
ETL_CONSTEXPR14 ETL_OR_STD::pair< TDestinationTrue, TDestinationFalse > etl::partition_transform ( TSource  begin,
TSource  end,
TDestinationTrue  destination_true,
TDestinationFalse  destination_false,
TUnaryFunctionTrue  function_true,
TUnaryFunctionFalse  function_false,
TUnaryPredicate  predicate 
)

Transforms the elements from the range (begin, end) to two different ranges depending on the value returned by the predicate.

◆ partition_transform() [2/2]

template<typename TSource1 , typename TSource2 , typename TDestinationTrue , typename TDestinationFalse , typename TBinaryFunctionTrue , typename TBinaryFunctionFalse , typename TBinaryPredicate >
ETL_CONSTEXPR14 ETL_OR_STD::pair< TDestinationTrue, TDestinationFalse > etl::partition_transform ( TSource1  begin1,
TSource1  end1,
TSource2  begin2,
TDestinationTrue  destination_true,
TDestinationFalse  destination_false,
TBinaryFunctionTrue  function_true,
TBinaryFunctionFalse  function_false,
TBinaryPredicate  predicate 
)

Transforms the elements from the ranges (begin1, end1) & (begin2) to two different ranges depending on the value returned by the predicate.

◆ remove()

template<typename TIterator , typename T >
ETL_CONSTEXPR14 TIterator etl::remove ( TIterator  first,
TIterator  last,
const T &  value 
)

Remove

◆ remove_if()

template<typename TIterator , typename TUnaryPredicate >
ETL_CONSTEXPR14 TIterator etl::remove_if ( TIterator  first,
TIterator  last,
TUnaryPredicate  predicate 
)

Remove If

◆ selection_sort() [1/2]

template<typename TIterator >
ETL_CONSTEXPR20 void etl::selection_sort ( TIterator  first,
TIterator  last 
)

Sorts the elements using selection sort.

◆ selection_sort() [2/2]

template<typename TIterator , typename TCompare >
ETL_CONSTEXPR20 void etl::selection_sort ( TIterator  first,
TIterator  last,
TCompare  compare 
)

Sorts the elements using selection sort. Uses user defined comparison.

◆ shell_sort() [1/2]

template<typename TIterator >
ETL_CONSTEXPR20 void etl::shell_sort ( TIterator  first,
TIterator  last 
)

Sorts the elements using shell sort.

◆ shell_sort() [2/2]

template<typename TIterator , typename TCompare >
ETL_CONSTEXPR20 void etl::shell_sort ( TIterator  first,
TIterator  last,
TCompare  compare 
)

Sorts the elements using shell sort. Uses user defined comparison.

◆ sort() [1/2]

template<typename TIterator >
void etl::sort ( TIterator  first,
TIterator  last 
)

Sorts the elements.

◆ sort() [2/2]

template<typename TIterator , typename TCompare >
void etl::sort ( TIterator  first,
TIterator  last,
TCompare  compare 
)

Sorts the elements. Uses user defined comparison.

◆ stable_sort() [1/2]

template<typename TIterator >
void etl::stable_sort ( TIterator  first,
TIterator  last 
)

Sorts the elements. Stable.

◆ stable_sort() [2/2]

template<typename TIterator , typename TCompare >
void etl::stable_sort ( TIterator  first,
TIterator  last,
TCompare  compare 
)

Sorts the elements. Stable. Uses user defined comparison.

◆ transform_if() [1/2]

template<typename TInputIterator , typename TOutputIterator , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_if ( TInputIterator  i_begin,
const TInputIterator  i_end,
TOutputIterator  o_begin,
TUnaryFunction  function,
TUnaryPredicate  predicate 
)

Like std::transform but applies a predicate before calling the function.

◆ transform_if() [2/2]

template<typename TInputIterator1 , typename TInputIterator2 , typename TOutputIterator , typename TBinaryFunction , typename TBinaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_if ( TInputIterator1  i_begin1,
const TInputIterator1  i_end1,
TInputIterator2  i_begin2,
TOutputIterator  o_begin,
TBinaryFunction  function,
TBinaryPredicate  predicate 
)

Like etl::transform_if but inputs from two ranges.

◆ transform_n() [1/2]

template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TUnaryFunction >
ETL_CONSTEXPR14 void etl::transform_n ( TInputIterator  i_begin,
TSize  n,
TOutputIterator  o_begin,
TUnaryFunction  function 
)

Transform 'n' items. Random iterators. There is currently no STL equivalent.

◆ transform_n() [2/2]

template<typename TInputIterator1 , typename TInputIterator2 , typename TSize , typename TOutputIterator , typename TBinaryFunction >
ETL_CONSTEXPR14 void etl::transform_n ( TInputIterator1  i_begin1,
TInputIterator2  i_begin2,
TSize  n,
TOutputIterator  o_begin,
TBinaryFunction  function 
)

Transform 'n' items from two ranges. Random iterators. There is currently no STL equivalent.

◆ transform_n_if() [1/2]

template<typename TInputIterator , typename TSize , typename TOutputIterator , typename TUnaryFunction , typename TUnaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_n_if ( TInputIterator  i_begin,
TSize  n,
TOutputIterator  o_begin,
TUnaryFunction  function,
TUnaryPredicate  predicate 
)

Like std::transform_if, for 'n' items.

◆ transform_n_if() [2/2]

template<typename TInputIterator1 , typename TInputIterator2 , typename TSize , typename TOutputIterator , typename TBinaryFunction , typename TBinaryPredicate >
ETL_CONSTEXPR14 TOutputIterator etl::transform_n_if ( TInputIterator1  i_begin1,
TInputIterator2  i_begin2,
TSize  n,
TOutputIterator  o_begin,
TBinaryFunction  function,
TBinaryPredicate  predicate 
)

Like etl::transform_if but inputs from two ranges for 'n' items.

◆ transform_s()

template<typename TInputIterator , typename TOutputIterator , typename TUnaryFunction >
ETL_CONSTEXPR14 TOutputIterator etl::transform_s ( TInputIterator  i_begin,
TInputIterator  i_end,
TOutputIterator  o_begin,
TOutputIterator  o_end,
TUnaryFunction  function 
)

A safer form of std::transform where the transform returns when the first range end is reached. There is currently no STL equivalent.