C++ Reference http://www.cppreference.com/wiki/ 2009-10-09T02:30:22-07:00 C++ Reference http://www.cppreference.com/wiki/ http://www.cppreference.com/wiki/lib/images/favicon.ico text/html 2009-10-09T02:25:57-07:00 iter_swap http://www.cppreference.com/wiki/stl/algorithm/iter_swap?rev=1255080357&do=diff iter_swap Syntax: #include <algorithm> void iter_swap( forward_iterator a, forward_iterator b ); A call to iter_swap() exchanges the values of two elements exactly as a call to swap( *a, *b ); would. Related Topics: swap, swap_ranges text/html 2009-10-09T02:23:02-07:00 swap_ranges http://www.cppreference.com/wiki/stl/algorithm/swap_ranges?rev=1255080182&do=diff swap_ranges Syntax: #include <algorithm> forward_iterator2 swap_ranges( forward_iterator start1, forward_iterator end1, forward_iterator2 start2 ); The swap_ranges() function exchanges the elements in the range [start1,end1) with the range of the same size starting at start2. text/html 2009-10-09T02:19:08-07:00 nth_element http://www.cppreference.com/wiki/stl/algorithm/nth_element?rev=1255079948&do=diff nth_element Syntax: #include <algorithm> void nth_element( random_iterator start, random_iterator nth, random_iterator end ); void nth_element( random_iterator start, random_iterator nth, random_iterator end, StrictWeakOrdering cmp ); text/html 2009-10-09T02:17:19-07:00 min_element http://www.cppreference.com/wiki/stl/algorithm/min_element?rev=1255079839&do=diff min_element Syntax: #include <algorithm> forward_iterator min_element( forward_iterator start, forward_iterator end ); forward_iterator min_element( forward_iterator start, forward_iterator end, BinPred p ); The min_element() function returns an iterator to the smallest element in the range [start,end). text/html 2009-10-09T02:16:41-07:00 max_element http://www.cppreference.com/wiki/stl/algorithm/max_element?rev=1255079801&do=diff max_element Syntax: #include <algorithm> forward_iterator max_element( forward_iterator start, forward_iterator end ); forward_iterator max_element( forward_iterator start, forward_iterator end, BinPred p ); The max_element() function returns an iterator to the largest element in the range [start,end). text/html 2009-10-09T02:14:39-07:00 prev_permutation http://www.cppreference.com/wiki/stl/algorithm/prev_permutation?rev=1255079679&do=diff prev_permutation Syntax: #include <algorithm> bool prev_permutation( bidirectional_iterator start, bidirectional_iterator end ); bool prev_permutation( bidirectional_iterator start, bidirectional_iterator end, StrictWeakOrdering cmp ); text/html 2009-10-09T02:13:55-07:00 next_permutation http://www.cppreference.com/wiki/stl/algorithm/next_permutation?rev=1255079635&do=diff next_permutation Syntax: #include <algorithm> bool next_permutation( bidirectional_iterator start, bidirectional_iterator end ); bool next_permutation( bidirectional_iterator start, bidirectional_iterator end, StrictWeakOrdering cmp ); text/html 2009-10-09T02:12:27-07:00 lexicographical_compare http://www.cppreference.com/wiki/stl/algorithm/lexicographical_compare?rev=1255079547&do=diff lexicographical_compare Syntax: #include <algorithm> bool lexicographical_compare( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2 ); bool lexicographical_compare( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, BinPred p ); text/html 2009-10-09T02:10:29-07:00 sort_heap http://www.cppreference.com/wiki/stl/algorithm/sort_heap?rev=1255079429&do=diff sort_heap Syntax: #include <algorithm> void sort_heap( random_iterator start, random_iterator end ); void sort_heap( random_iterator start, random_iterator end, StrictWeakOrdering cmp ); The sort_heap() function turns the heap defined by [start,end) into a sorted range. text/html 2009-10-09T02:09:28-07:00 make_heap http://www.cppreference.com/wiki/stl/algorithm/make_heap?rev=1255079368&do=diff make_heap Syntax: #include <algorithm> void make_heap( random_iterator start, random_iterator end ); void make_heap( random_iterator start, random_iterator end, StrictWeakOrdering cmp ); The make_heap() function turns the given range of elements [start,end) into a heap. text/html 2009-10-09T02:08:52-07:00 pop_heap http://www.cppreference.com/wiki/stl/algorithm/pop_heap?rev=1255079332&do=diff pop_heap Syntax: #include <algorithm> void pop_heap( random_iterator start, random_iterator end ); void pop_heap( random_iterator start, random_iterator end, StrictWeakOrdering cmp ); The pop_heap() function removes the largest element (defined as the element at the front of the heap) from the given heap. text/html 2009-10-09T02:08:01-07:00 push_heap http://www.cppreference.com/wiki/stl/algorithm/push_heap?rev=1255079281&do=diff push_heap Syntax: #include <algorithm> void push_heap( random_iterator start, random_iterator end ); void push_heap( random_iterator start, random_iterator end, StrictWeakOrdering cmp ); The push_heap() function adds an element (defined as the last element before end) to a heap (defined as the range of elements between [start,''end-1). text/html 2009-10-09T02:06:42-07:00 set_symmetric_difference http://www.cppreference.com/wiki/stl/algorithm/set_symmetric_difference?rev=1255079202&do=diff set_symmetric_difference Syntax: #include <algorithm> output_iterator set_symmetric_difference( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result ); output_iterator set_symmetric_difference( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result, StrictWeakOrdering cmp ); text/html 2009-10-09T02:04:50-07:00 set_difference http://www.cppreference.com/wiki/stl/algorithm/set_difference?rev=1255079090&do=diff set_difference Syntax: #include <algorithm> template< typename InIterA, typename InIterB, typename OutIter > OutIter set_difference( InIterA start1, InIterA end1, InIterB start2, InIterB end2, OutIter result ); template< typename InIterA, typename InIterB, typename OutIter, typename StrictWeakOrdering > OutIter set_difference( InIterA start1, InIterA end1, InIterB start2, InIterB end2, OutIter result, StrictWeakOrdering cmp ); text/html 2009-10-09T02:04:02-07:00 set_intersection http://www.cppreference.com/wiki/stl/algorithm/set_intersection?rev=1255079042&do=diff set_intersection Syntax: #include <algorithm> template< typename InIterA, typename InIterB, typename OutIter > OutIter set_intersection( InIterA start1, InIterA end1, InIterB start2, InIterB end2, OutIter result ); template< typename InIterA, typename InIterB, typename OutIter, typename StrictWeakOrdering > OutIter set_intersection( InIterA start1, InIterA end1, InIterB start2, InIterB end2, OutIter result, StrictWeakOrdering cmp ); text/html 2009-10-09T02:03:03-07:00 set_union http://www.cppreference.com/wiki/stl/algorithm/set_union?rev=1255078983&do=diff set_union Syntax: #include <algorithm> output_iterator set_union( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result ); output_iterator set_union( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result, StrictWeakOrdering cmp ); text/html 2009-10-09T01:59:55-07:00 stable_partition http://www.cppreference.com/wiki/stl/algorithm/stable_partition?rev=1255078795&do=diff stable_partition Syntax: #include <algorithm> bidirectional_iterator stable_partition( bidirectional_iterator start, bidirectional_iterator end, Predicate p ); The stable_partition() function behaves similarily to partition(). The difference between the two algorithms is that stable_partition() will preserve the initial ordering of the elements in the two groups. text/html 2009-10-09T01:59:17-07:00 partition http://www.cppreference.com/wiki/stl/algorithm/partition?rev=1255078757&do=diff partition Syntax: #include <algorithm> bidirectional_iterator partition( bidirectional_iterator start, bidirectional_iterator end, Predicate p ); The partition algorithm re-orders the elements in [start,end) such that the elements for which the predicate p returns true come before the elements for which p returns false. text/html 2009-10-09T01:56:40-07:00 inplace_merge http://www.cppreference.com/wiki/stl/algorithm/inplace_merge?rev=1255078600&do=diff inplace_merge Syntax: #include <algorithm> void inplace_merge( bidirectional_iterator start, bidirectional_iterator middle, bidirectional_iterator end ); void inplace_merge( bidirectional_iterator start, bidirectional_iterator middle, bidirectional_iterator end, StrictWeakOrdering cmp ); text/html 2009-10-09T01:55:23-07:00 merge http://www.cppreference.com/wiki/stl/algorithm/merge?rev=1255078523&do=diff merge Syntax: #include <algorithm> output_iterator merge( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result ); output_iterator merge( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result, StrictWeakOrdering cmp );