rapid
A ROS robotics library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
stochastic_universal_sampling.h
Go to the documentation of this file.
1 #ifndef _RAPID_UTILS_STOCHASTIC_UNIVERSAL_SAMPLING_H_
2 #define _RAPID_UTILS_STOCHASTIC_UNIVERSAL_SAMPLING_H_
3 
4 #include <vector>
5 
6 #include "rapid_utils/random.h"
7 
8 namespace rapid {
9 namespace utils {
16 void StochasticUniversalSampling(const std::vector<double>& cdf,
17  int num_samples, std::vector<int>* indices);
18 
27 void StochasticUniversalSampling(const std::vector<double>& cdf,
28  int num_samples,
29  const RandomNumberInterface& rng,
30  std::vector<int>* indices);
31 } // namespace utils
32 } // namespace rapid
33 
34 #endif // _RAPID_UTILS_STOCHASTIC_UNIVERSAL_SAMPLING_H_
void StochasticUniversalSampling(const std::vector< double > &cdf, int num_samples, std::vector< int > *indices)
Sample randomly from a CDF with a uniform sampling method.