[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

Public Types | Public Member Functions | List of all members
NormalRandomFunctor< Engine > Class Template Reference

`#include <vigra/random.hxx>`

## Public Types

typedef double | result_type
| STL required functor result type.

## Public Member Functions

| NormalRandomFunctor (double mean, double stddev, Engine &generator=Engine::global())
| NormalRandomFunctor (Engine const &generator=Engine::global())
double | operator() () const

## Detailed Description

template<class Engine = MersenneTwister>
class vigra::NormalRandomFunctor< Engine >

Functor to create normal variate random numbers.

This functor encapsulates the function normal() of the given random number Engine (usually RandomTT800 or RandomMT19937) in an STL-compatible interface.

Traits defined:

    FunctorTraits<UniformIntRandomFunctor<Engine> >::isInitializer

is true (VigraTrueType).

## Constructor & Destructor Documentation

## ◆ NormalRandomFunctor() [1/2]

template<class Engine = MersenneTwister>

NormalRandomFunctor | ( | Engine const & | generator = Engine::global() | ) |

Create functor for standard normal random numbers using the given engine.

That is, mean is 0.0 and standard deviation is 1.0.

## ◆ NormalRandomFunctor() [2/2]

template<class Engine = MersenneTwister>

NormalRandomFunctor | ( | double | mean,
|  | double | stddev,
|  | Engine & | generator = Engine::global() )

Create functor for normal random numbers with given mean and standard deviation using the given engine.

## Member Function Documentation

## ◆ operator()()

template<class Engine = MersenneTwister>

double operator() | ( |  | ) | const

Return a random number as specified in the constructor.

The documentation for this class was generated from the following file:

- vigra/random.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.12.4