Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

Sorting Template Functions

 

template <class Range, class Less>

void Sort(Range&& c, const Less& less)

Sorts range c with ordering is defined by less. The order of elements with the same value can be changed (unstable sort).

 


 

template <class Range>

void Sort(Range&& c)

Sorts range c with ordering is defined by operator<. The order of elements with the same value can be changed (unstable sort).

 


 

template <class Range, class Less>

void StableSort(Range&& r, const Less& less)

Sorts container c with ordering is defined by less. The order of elements with the same value stays unchanged (stable sort).

 


 

template <class Range>

void StableSort(Range&& r)

Sorts container c with ordering is defined by operator<. The order of elements with the same value stays unchanged (stable sort).

 


 

template <class MasterRange, class Range2, class Less>

void IndexSort(MasterRange&& r, Range2&& r2, const Less& less)

template <class MasterRange, class Range2, class Range3, class Less>

void IndexSort2(MasterRange&& r, Range2&& r2, Range3&& r3, const Less& less)

template <class MasterRange, class Range2, class Range3, class Range4, class Less>

void IndexSort3(MasterRange&& r, Range2&& r2, Range3&& r3, Range4&& r4, const Less& less)

Sorts 2, 3 or 4 containers. All containers must have same number of items. Resulting order is defined by the r container. Ordering is defined by less.

 


 

template <class MasterRange, class Range2>

void IndexSort(MasterRange&& r, Range2&& r2)

template <class MasterRange, class Range2, class Range3>

void IndexSort2(MasterRange&& r, Range2&& r2, Range3&& r3)

template <class MasterRange, class Range2, class Range3, class Range4>

void IndexSort3(MasterRange&& r, Range2&& r2, Range3&& r3, Range4&& r4)

Sorts 2, 3 or 4 containers. All containers must have same number of items. Resulting order is defined by the r container. Ordering is defined by operator<.

 


 

template <class MasterRange, class Range2, class Less>

void StableIndexSort(MasterRange&& r, Range2&& r2, const Less& less)

template <class MasterRange, class Range2, class Range3,class Less>

void StableIndexSort2(MasterRange&& r, Range2&& r2, Range3&& r3, const Less& less)

template <class MasterRange, class Range2, class Range3, class Range4, class Less>

void StableIndexSort3(MasterRange&& r, Range2&& r2, Range3&& r3, Range4&& r4, const Less& less)

Sorts 2, 3 or 4 containers. All containers must have same number of items. Resulting order is defined by the r container. Ordering is defined by less. The order of elements with the same value stays unchanged (stable sort).

 


 

template <class MasterRange, class Range2>

void StableIndexSort(MasterRange&& r, Range2&& r2)

template <class MasterRange, class Range2, class Range3>

void StableIndexSort2(MasterRange&& r, Range2&& r2, Range3&& r3)

template <class MasterRange, class Range2, class Range3, class Range4>

void StableIndexSort3(MasterRange&& r, Range2&& r2, Range3&& r3, Range4&& r4)

Sorts pair of containers. Both containers must have same number of items. Resulting order is determined by the r container. Ordering is determined by operator<.

 


 

template <class Range, class Less>

Vector<intGetSortOrder(const Range& r, 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 Range>

Vector<intGetSortOrder(const Range& r)

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 Range, class Less>

Vector<intGetStableSortOrder(const Range& r, 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 Range>

Vector<intGetStableSortOrder(const Range& r)

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.

 

Do you want to contribute?