Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Namespaces | Functions
RandomGenerators.h File Reference
#include <mrpt/utils/utils_defs.h>
#include <mrpt/math/CMatrixTemplateNumeric.h>
#include <random>
#include <limits>

Go to the source code of this file.

Classes

class  mrpt::random::CRandomGenerator
 A thred-safe pseudo random number generator, based on an internal MT19937 randomness generator. More...
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::random
 A namespace of pseudo-random numbers genrators of diferent distributions.
 

Functions

CRandomGeneratormrpt::random::getRandomGenerator ()
 A static instance of a CRandomGenerator class, for use in single-thread applications. More...
 
ptrdiff_t mrpt::random::random_generator_for_STL (ptrdiff_t i)
 A random number generator for usage in STL algorithms expecting a function like this (eg, random_shuffle): More...
 
template<class MAT >
void mrpt::random::matrixRandomUni (MAT &matrix, const double unif_min=0, const double unif_max=1)
 Fills the given matrix with independent, uniformly distributed samples. More...
 
template<class T >
void mrpt::random::vectorRandomUni (std::vector< T > &v_out, const T &unif_min=0, const T &unif_max=1)
 Fills the given matrix with independent, uniformly distributed samples. More...
 
template<class MAT >
void mrpt::random::matrixRandomNormal (MAT &matrix, const double mean=0, const double std=1)
 Fills the given matrix with independent, normally distributed samples. More...
 
template<class T >
void mrpt::random::vectorRandomNormal (std::vector< T > &v_out, const T &mean=0, const T &std=1)
 Generates a random vector with independent, normally distributed samples. More...
 
void mrpt::random::Randomize (const uint32_t seed)
 Randomize the generators. More...
 
void mrpt::random::Randomize ()
 
template<class T >
void mrpt::random::randomPermutation (const std::vector< T > &in_vector, std::vector< T > &out_result)
 Returns a random permutation of a vector: all the elements of the input vector are in the output but at random positions. More...
 
template<typename T >
void mrpt::random::randomNormalMultiDimensional (const mrpt::math::CMatrixTemplateNumeric< T > &cov, std::vector< T > &out_result)
 Generate multidimensional random samples according to a given covariance matrix. More...
 
template<typename T >
void mrpt::random::randomNormalMultiDimensionalMany (const mrpt::math::CMatrixTemplateNumeric< T > &cov, size_t desiredSamples, std::vector< std::vector< T >> &ret, std::vector< T > *samplesLikelihoods=nullptr)
 Generate a given number of multidimensional random samples according to a given covariance matrix. More...
 
template<typename T , typename MATRIXLIKE >
void mrpt::random::randomNormalMultiDimensionalMany (const MATRIXLIKE &cov, size_t desiredSamples, std::vector< std::vector< T >> &ret)
 Generate multidimensional random samples according to a given covariance matrix. More...
 
template<typename T , typename MATRIXLIKE >
void mrpt::random::randomNormalMultiDimensional (const MATRIXLIKE &cov, std::vector< T > &out_result)
 Generate multidimensional random samples according to a given covariance matrix. More...
 



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019