Modules | Functions
Condition Algorithms

Modules

 Searching Algorithms
 

Functions

template<typename ForwardIterator >
bool ustl::is_sorted (ForwardIterator first, ForwardIterator last)
 Returns true if the given range is sorted.
 
template<typename InputIterator1 , typename InputIterator2 >
bool ustl::lexicographical_compare (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2)
 Compares two given containers like strcmp compares strings.
 
template<typename Container , typename EqualityComparable >
size_t ustl::count (const Container &ctr, const EqualityComparable &value)
 
template<typename Container , typename Predicate >
size_t ustl::count_if (const Container &ctr, Predicate pred)
 
template<typename RandomAccessIterator , typename Compare >
bool ustl::is_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Returns true if the given range is a heap under comp. A heap is a sequentially encoded binary tree where for every node comp(node,child1) is false and comp(node,child2) is false.
 

Detailed Description

Algorithms for obtaining information about data.

Function Documentation

template<typename Container , typename EqualityComparable >
size_t ustl::count ( const Container &  ctr,
const EqualityComparable &  value 
)
inline

Count finds the number of elements in [first, last) that are equal to value. More precisely, the first version of count returns the number of iterators i in [first, last) such that *i == value.

References ustl::count().

template<typename Container , typename Predicate >
size_t ustl::count_if ( const Container &  ctr,
Predicate  pred 
)
inline

Count_if finds the number of elements in [first, last) that satisfy the predicate pred. More precisely, the first version of count_if returns the number of iterators i in [first, last) such that pred(*i) is true.


Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10