YARP
Yet Another Robot Platform
yarp::math::NormRand Class Reference

A static class grouping function for normal random number generator. More...

#include <yarp/math/NormRand.h>

Static Public Member Functions

static double scalar (double u=0.0, double sigma=1.0)
 
static yarp::sig::Vector vector (int s, double u=0.0, double sigma=1.0)
 
static yarp::sig::Vector vector (const yarp::sig::Vector &u, const yarp::sig::Vector &sigma)
 
static yarp::sig::Matrix matrix (int r, int c, double u=0.0, double sigma=1.0)
 
static void init ()
 Initialize the random number generator, with current time (time(0)). More...
 
static void init (int seed)
 Initialize the random number generator, provide a seed. More...
 

Detailed Description

A static class grouping function for normal random number generator.

Thread safe.

Methods inside this class provides access to a global instance of a RandNScalar object that generates random numbers.

Definition at line 38 of file NormRand.h.

Member Function Documentation

◆ init() [1/2]

void NormRand::init ( )
static

Initialize the random number generator, with current time (time(0)).

Definition at line 56 of file NormRand.cpp.

◆ init() [2/2]

void NormRand::init ( int  seed)
static

Initialize the random number generator, provide a seed.

Parameters
seeda seed.

Definition at line 61 of file NormRand.cpp.

◆ matrix()

yarp::sig::Matrix NormRand::matrix ( int  r,
int  c,
double  u = 0.0,
double  sigma = 1.0 
)
static

Definition at line 45 of file NormRand.cpp.

◆ scalar()

double NormRand::scalar ( double  u = 0.0,
double  sigma = 1.0 
)
static

Definition at line 18 of file NormRand.cpp.

◆ vector() [1/2]

yarp::sig::Vector NormRand::vector ( const yarp::sig::Vector u,
const yarp::sig::Vector sigma 
)
static

Definition at line 34 of file NormRand.cpp.

◆ vector() [2/2]

yarp::sig::Vector NormRand::vector ( int  s,
double  u = 0.0,
double  sigma = 1.0 
)
static

Definition at line 23 of file NormRand.cpp.


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