文章

std::accumulate


// <numeric> template <class InputIterator, class T> T accumulate ( InputIterator first, InputIterator last, T init ); template <class InputIterator, class T, class BinaryOperation> T accumulate ( InputIterator first, InputIterator last, T init, ​ BinaryOperation binary_op );...

11-05

std::remove_copy_if


// <algorithm> template <class InputIterator, class OutputIterator, class UnaryPredicate> OutputIterator remove_copy_if ( InputIterator first, InputIterator last, OutputIterator result, ​UnaryPredicate pred); 拷贝一个范围的元素,将其中值满足给定条件的元素删除。该函数等价于:template<class _InIt, class _OutIt,...

11-05

std::remove_copy


// <algorithm> template <class InputIterator, class OutputIterator, class T> OutputIterator remove_copy ( InputIterator first, InputIterator last, ​ OutputIterator result, const T& val); 拷贝一个范围的元素,将其中值等价于给定值的元素删除。该函数等价于:template<class _InIt, class _OutIt, class _Ty> inline...

11-05

std::count_if


// <algorithm> template <class InputIterator, class Predicate> typename iterator_traits<InputIterator>::difference_type count_if (InputIterator first, ​ InputIterator last, UnaryPredicate pred); 返回值满足给定条件的元素的个数。该函数等价于:template<class _InIt, class _Pr> inline typename itera...

11-05

std::qsort


// <cstdlib> void qsort (void* base, size_t num, size_t size, int (*compare)(const void*,const void*)); 快速(Quick)排序。如果您使用 C++ 编程,推荐参考 std::sort 、std::stable_sort、std::partial_sort。

11-05

std::bsearch


// <cstdlib> void* bsearch (const void* key, const void* base, size_t num, size_t size, ​ int (*compar)(const void*,const void*)); 二分(Binary)查找。如果您使用 C++ 编程,推荐参考 std::binary_search

11-05

std::prev_permutation


// <algorithm> // 默认(1)     template <class BidirectionalIterator> bool prev_permutation ( BidirectionalIterator first,     BidirectionalIterator last ); // 自定义(2)     template <class BidirectionalIterator, class Compare>   bool prev_permutation ( BidirectionalIterator first, ...

11-04

std::next_permutation


// <algorithm> // 默认(1) template <class BidirectionalIterator> bool next_permutation ( BidirectionalIterator first,         BidirectionalIterator last); // 自定义(2)     template <class BidirectionalIterator, class Compare>   bool next_permutation ( BidirectionalIterator first,  ...

11-04

std::lexicographical_compare


// <algorithm> // 等价比较(1) template <class InputIterator1, class InputIterator2>   bool lexicographical_compare ( InputIterator1 first1, InputIterator1 last1,         InputIterator2 first2, InputIterator2 last2); // 自定义谓词比较(2)     template <class InputIterator1, class InputIterat...

11-04

std::minmax_element


C++11// <algorithm> // 默认(1)     template <class ForwardIterator> pair<ForwardIterator,ForwardIterator>     minmax_element ( ForwardIterator first, ForwardIterator last); // 自定义(2)     template <class ForwardIterator, class Compare> pair<ForwardIterator,ForwardIterato...

10-24