PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
CountingSort.h File Reference

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)
 

Detailed Description

Counting sort.

Author
Quoc-Minh Ton-That (tonth.nosp@m.at.q.nosp@m.uocmi.nosp@m.nh@g.nosp@m.mail..nosp@m.com)
Date
2025-03-26