YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
RandnScalar.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef YARP_MATH_RANDNSCALAR_H
8
#define YARP_MATH_RANDNSCALAR_H
9
10
#include <
yarp/math/RandScalar.h
>
11
#include <
yarp/math/api.h
>
12
13
namespace
yarp::math
{
14
class
RandnScalar;
15
}
16
21
class
YARP_math_API
yarp
::
math::RandnScalar
22
{
23
void
*impl;
24
long
seed;
25
26
double
y[2];
// required by the boxmuller transform
27
bool
executeBoxMuller;
// boxMuller transform generates two mubers at the time, this flag determines when to re-use previous.
28
29
private
:
30
RandnScalar
(
const
RandnScalar
&l);
31
36
inline
void
boxMuller();
37
public
:
41
RandnScalar
();
42
~RandnScalar
();
43
48
RandnScalar
(
int
seed);
49
54
void
init
();
55
61
void
init
(
int
seed);
62
63
long
getSeed
()
64
{
return
seed; }
65
73
double
get
(
double
u=0.0,
double
sigma=1.0);
74
};
75
76
#endif
// YARP_MATH_RANDNSCALAR_H
RandScalar.h
yarp::math::RandnScalar
A random number generator, normal distribution.
Definition
RandnScalar.h:22
yarp::math::RandnScalar::getSeed
long getSeed()
Definition
RandnScalar.h:63
yarp::math::RandnScalar::get
double get(double u=0.0, double sigma=1.0)
Generate a randomly generated number, drawn from a normal distribution.
Definition
RandnScalar.cpp:55
yarp::math::RandnScalar::~RandnScalar
~RandnScalar()
Definition
RandnScalar.cpp:34
yarp::math::RandnScalar::RandnScalar
RandnScalar()
Constructor.
Definition
RandnScalar.cpp:22
yarp::math::RandnScalar::init
void init()
Initialize the generator.
Definition
RandnScalar.cpp:40
yarp::math
Definition
FrameTransform.h:14
yarp
The main, catch-all namespace for YARP.
Definition
dirs.h:16
api.h
YARP_math_API
#define YARP_math_API
Definition
api.h:17
YARP
3.9.0+210-20240906.11+gita697bdf68
src
libYARP_math
src
yarp
math
RandnScalar.h
Generated on Sun Sep 8 2024 02:30:45 for YARP by
1.9.8