YARP
Yet Another Robot Platform
NormRand.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_NORMRAND_H
8 #define YARP_MATH_NORMRAND_H
9 
10 #include <yarp/sig/Vector.h>
11 #include <yarp/sig/Matrix.h>
12 #include <yarp/math/Rand.h>
13 #include <yarp/math/api.h>
14 
15 namespace yarp
16 {
17  namespace math
18  {
19 
23  class NormRand;
24  }
25 }
26 
27 
36 {
37 public:
38  static double scalar(double u=0.0, double sigma=1.0);
39  static yarp::sig::Vector vector(int s, double u=0.0, double sigma=1.0);
40  static yarp::sig::Vector vector(const yarp::sig::Vector &u, const yarp::sig::Vector &sigma);
41 
42  static yarp::sig::Matrix matrix(int r, int c, double u=0.0, double sigma=1.0);
43 
48  static void init();
49 
55  static void init(int seed);
56 };
57 
58 #endif // YARP_MATH_NORMRAND_H
contains the definition of a Matrix type
contains the definition of a Vector type
A static class grouping function for normal random number generator.
Definition: NormRand.h:36
static void init()
Initialize the random number generator, with current time (time(0)).
Definition: NormRand.cpp:54
static double scalar(double u=0.0, double sigma=1.0)
Definition: NormRand.cpp:15
static yarp::sig::Vector vector(int s, double u=0.0, double sigma=1.0)
Definition: NormRand.cpp:20
static yarp::sig::Matrix matrix(int r, int c, double u=0.0, double sigma=1.0)
Definition: NormRand.cpp:42
A class for a Matrix.
Definition: Matrix.h:43
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_math_API
Definition: api.h:17