PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
|
Counting sort. More...
#include <algorithm>
#include <concepts>
#include <iterator>
#include <limits>
#include <numeric>
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | pbat |
The main namespace of the library. | |
namespace | pbat::common |
Common functionality. | |
Functions | |
template<std::random_access_iterator TWorkBegin, std::random_access_iterator TWorkEnd, std::random_access_iterator TValuesBegin, std::random_access_iterator TValuesEnd, class FKey, class T = typename std::iterator_traits<TValuesBegin>::value_type, class TKey = typename std::invoke_result_t<FKey, T>> | |
void | pbat::common::CountingSort (TWorkBegin wb, TWorkEnd we, TValuesBegin vb, TValuesEnd ve, TKey keyMin=std::numeric_limits< TKey >::max(), FKey fKey=[](T const &key) { return key;}) |
Counting sort. | |
template<std::random_access_iterator TValuesBegin, std::random_access_iterator TValuesEnd, std::random_access_iterator TWorkBegin, class FKey> | |
void | pbat::common::PrefixSumFromSortedKeys (TValuesBegin vb, TValuesEnd ve, TWorkBegin wb, FKey fKey) |
Counting sort.