text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

c09p491.h

Go to the documentation of this file.
00001 
00015 void sort(RandomIter first, RandomIter last);
00016 void sort(RandomIter first, RandomIter last, Compare cmp);
00017 // Sorts first to last into ascending order by default.
00018 // A comparison function object may be supplied.
00019 
00020 void stable_sort(RandomIter first, RandomIter last);
00021 void stable_sort(RandomIter first, RandomIter last,
00022        Compare cmp);
00023 // Sorts first to last into ascending order by default.
00024 // A comparison function object may be supplied.
00025 // Preserves original ordering of equivalent elements.
00026 
00027 void partial_sort(RandomIter first, RandomIter middle,
00028                   RandomIter last);
00029 void partial_sort(RandomIter first, RandomIter middle,
00030                   RandomIter last, Compare cmp);
00031 // Sorts the number of elements from first to last
00032 // and places them in the range from first to middle.
00033 // Elements from middle to last are not ordered.
00034 // Default sort is in ascending order.
00035 // A comparison function object may be supplied.
00036 RandomIter partial_sort_copy(InputIter first, InputIter last,
00037               RandomIter first2, RandomIter last2);
00038 RandomIter partial_sort_copy(InputIter first, InputIter last,
00039               RandomIter first2, RandomIter last2,
00040               Compare cmp);
00041 // Sorts the number of elements from first to last
00042 // and copies them into a container in the range
00043 // from first2 to last2.
00044 // Default sort is in ascending order.
00045 // A comparison function object may be supplied.
00046 
00047 void nth_element(RandomIter first, RandomIter nth,
00048                  RandomIter, last);
00049 void nth_element(RandomIter first, RandomIter nth,
00050                  RandomIter last, Compare cmp);
00051 // The nth element becomes a dividing point for the container.
00052 // The ranges from first to nth and nth to last are not sorted.
00053 // All elements from first to nth are less than or equal to nth.
00054 // All elements from nth to last are greater than nth.
00055 // A comparison function object may be supplied.
00056 
00057 BiIter partition(BiIter first, BiIter last,
00058                  Predicate p);
00059 // The container is partitioned to place all elements that
00060 // satisfy a particular predicate p before every element that
00061 // does not satisfy the predicate p.
00062 // The two ranges are not sorted.
00063 // The return iterator points to either the first element that
00064 // does not satisfy the predicate p or the end.
00065 // Relative order of equivalent elements is not maintained.
00066 
00067 BiIter stable_partition(BiIter first, BiIter last,
00068                         Predicate p);
00069 // The container is partitioned to place all elements that
00070 // satisfy a particular predicate p before every element that
00071 // does not satisfy the predicate p.
00072 // The two ranges are not sorted.
00073 // The return iterator points to either the first element that
00074 // does not satisfy the predicate p or the end.
00075 // Relative order of equivalent elements is maintained.
00076 
00077 OutputIter merge(InputIter first, InputIter last,
00078                  InputIter2 first2, InputIter2 last2,
00079                  OutIter res);
00080 OutputIter merge(InputIter first, InputIter last,
00081                  InputIter2 first2, InputIter2 last2,
00082                  OutputIter res, Compare cmp);
00083 // Takes two sorted ranges and
00084 // merges them into another sorted container.
00085 // A comparison function object may be supplied.
00086 // For equivalent elements, elements from the first range will
00087 // precede elements from the second.
00088 
00089 void inplace_merge(BiIter  first, BiIter middle, BiIter last);
00090 void inplace_merge(BiIter  first, BiIter middle, BiIter last,
00091                    Compare cmp);
00092 // Takes two parts of a sorted container
00093 // and merges them in place.
00094 // The two ranges are first to middle and middle to last.
00095 // A comparison function object may be supplied.
00096 // For equivalent elements, elements from the first range will
00097 // precede elements from the second.

Generated on Sun Aug 27 21:01:31 2006 for AWLogo by  doxygen 1.4.6