Sorting template functions
|
|
template <class T, class Less> void Sort(T& c, const Less& less)
Sorts container c with ordering is defined by less. The order of elements with the same value can be changed (unstable sort).
IterSwap must be defined for IteratorOf<T>.
template <class T> void Sort(T& c)
Sorts container c with ordering is determined by operator<. The order of elements with the same value can be changed (unstable sort).
IterSwap must be defined for IteratorOf<T>.
template <class T, class Less> void StableSort(T& c, const Less& less)
Sorts container c with ordering is defined by less. The order of elements with the same value stays unchanged (stable sort).
IterSwap must be defined for IteratorOf<T>.
template <class T> void StableSort(T& c)
Sorts container c with ordering is determined by operator<. The order of elements with the same value stays unchanged (stable sort).
IterSwap must be defined for IteratorOf<T>.
template <class KC, class VC, class Less> void IndexSort(KC& keys, VC& values, const Less& less)
Sorts pair of containers. Both containers must have same number of items. Resulting order is defined by the keys container. Ordering is defined by less.
template <class KC, class VC> void IndexSort(KC& keys, VC& values)
Sorts pair of containers. Both containers must have same number of items. Resulting order is determined by the keys container. Ordering is determined by operator<.
template <class C, class Less> Vector<int> GetSortOrder(const C& container, const Less& less)
Creates ascending order of values in container. Ordering is determined by less. The order of elements with the same value can be changed (unstable sort).
template <class C> Vector<int> GetSortOrder(const C& container)
Creates ascending order of values in container. Ordering is determined by operator<. The order of elements with the same value can be changed (unstable sort).
template <class C, class Less> Vector<int> GetStableSortOrder(const C& container, const Less& less)
Creates ascending order of values in container. Ordering is determined by less. The order of elements with the same value stays unchanged (stable sort).
template <class C> Vector<int> GetStableSortOrder(const C& container)
Creates ascending order of values in container. Ordering is determined by operator<. The order of elements with the same value stays unchanged (stable sort).
template <class Map, class Less> void SortByKey(Map& map, const Less& less)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by keys, using less as sorting predicate.
template <class Map> void SortByKey(Map& map)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by keys, using operator< as sorting predicate.
template <class Map, class Less> void SortByValue(Map& map, const Less& less)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by values, using less as sorting predicate.
template <class Map> void SortByValue(Map& map)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by values, using operator< as sorting predicate.
template <class Map, class Less> void StableSortByKey(Map& map, const Less& less)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by keys, using less as sorting predicate. Stable: retains the order of equal elements.
template <class Map> void StableSortByKey(Map& map)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by keys, using operator< as sorting predicate. Stable: retains the order of equal elements.
template <class Map, class Less> void StableSortByValue(Map& map, const Less& less)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by values, using less as sorting predicate. Stable: retains the order of equal elements.
template <class Map> void StableSortByValue(Map& map)
Sorts VectorMap or ArrayMap (or any other hypothetical container that supports required interfaces) map by values, using operator< as sorting predicate. Stable: retains the order of equal elements.
template <class Index, class Less> void SortIndex(Index& index, const Less& less)
Sorts Index or ArrayIndex using less as sorting predicate.
template <class Index> void SortIndex(Index& index)
Sorts Index or ArrayIndex.
template <class Index, class Less> void StableSortIndex(Index& index, const Less& less)
Sorts Index or ArrayIndex using less as sorting predicate. Stable: retains the order of equal elements.
template <class Index> void StableSortIndex(Index& index)
Sorts Index or ArrayIndex. Stable: retains the order of equal elements.
|