MIRA
Classes | Namespaces | Macros
RandomGenerator.h File Reference

Helper singleton to easily generate random generators using the boost::random distributions and generators. More...

#include <limits>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/variate_generator.hpp>
#include <boost/random/uniform_real.hpp>
#include <boost/random/uniform_int.hpp>
#include <platform/Types.h>
#include <utils/Time.h>
Include dependency graph for RandomGenerator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RandomGenerator< Distribution, Engine >
 Template class to easily generate random generators using the boost::random distributions and generators. More...
 

Namespaces

 mira
 specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
 

Macros

#define MIRA_RANDOM_GENERATOR_COMMON(Derived, TDistribution)
 Macro to be used in derived random generators to supply the default interface such copy constructors and assignment operators and typedefs of Base and Distribution. More...
 

Detailed Description

Helper singleton to easily generate random generators using the boost::random distributions and generators.

Author
Erik Einhorn
Date
2012/11/10

Macro Definition Documentation

◆ MIRA_RANDOM_GENERATOR_COMMON

#define MIRA_RANDOM_GENERATOR_COMMON (   Derived,
  TDistribution 
)
Value:
typedef RandomGenerator<TDistribution> Base; \
typedef TDistribution Distribution; \
Derived(const Distribution& dist) : Base(dist) {} \
Derived(const Derived& other) : Base(other) {} \
Derived& operator=(const Distribution& dist) { \
Base::operator=(dist); \
return *this; \
} \
Derived& operator=(const Derived& other) { \
Base::operator=(other); \
return *this; \
}

Macro to be used in derived random generators to supply the default interface such copy constructors and assignment operators and typedefs of Base and Distribution.