Fermat
Classes
Distributions

Detailed Description

This module provides a list of classes that provide methods to transform uniformly distributed numbers into different types of random distributions, and evaluate their density. Each such class provides the following basic interface:
struct Distribution
{
// map a uniformly-distributed number 'U into the desired distribution
float map(float U) const;
// evaluate the density of the distribution at the point 'x
float density(float x) const;
}
The module further provides an adaptor for random number generators, that can be used to adapt a generator to the desired distribution. e.g.
Random random_generator;
Cosine_distribution cos_distribution;
Transform_generator<Random,Cosine_distribution> cos_generator(random_generator,cos_distribution);
// approximate the average of the cosine distribution
float avg = 0.0f;
for (uint32 i = 0; i < 8; ++)
avg += cos_distribution.next();
avg /= 8;

Classes

struct  cugar::Base_distribution< Derived_type >
 
struct  cugar::Uniform_distribution
 
struct  cugar::Cosine_distribution
 
struct  cugar::Pareto_distribution
 
struct  cugar::Bounded_pareto_distribution
 
struct  cugar::Bounded_exponential
 
struct  cugar::Cauchy_distribution
 
struct  cugar::Exponential_distribution
 
struct  cugar::Gaussian_distribution_symm_2d
 
struct  cugar::Gaussian_distribution_2d
 
struct  cugar::Transform_generator< Generator, Distribution >
 
struct  cugar::Gaussian_generator
 
struct  cugar::Mixture< TDistribution, NCOMP >