YARP
Yet Another Robot Platform
NormRand.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_MATH_NORMRAND_H
11 #define YARP_MATH_NORMRAND_H
12 
13 #include <yarp/sig/Vector.h>
14 #include <yarp/sig/Matrix.h>
15 #include <yarp/math/Rand.h>
16 #include <yarp/math/api.h>
17 
18 namespace yarp
19 {
20  namespace math
21  {
22 
26  class NormRand;
27  }
28 }
29 
30 
39 {
40 public:
41  static double scalar(double u=0.0, double sigma=1.0);
42  static yarp::sig::Vector vector(int s, double u=0.0, double sigma=1.0);
43  static yarp::sig::Vector vector(const yarp::sig::Vector &u, const yarp::sig::Vector &sigma);
44 
45  static yarp::sig::Matrix matrix(int r, int c, double u=0.0, double sigma=1.0);
46 
51  static void init();
52 
58  static void init(int seed);
59 };
60 
61 #endif // YARP_MATH_NORMRAND_H
yarp::math::NormRand::matrix
static yarp::sig::Matrix matrix(int r, int c, double u=0.0, double sigma=1.0)
Definition: NormRand.cpp:45
yarp::math::NormRand
A static class grouping function for normal random number generator.
Definition: NormRand.h:39
yarp::math::NormRand::vector
static yarp::sig::Vector vector(int s, double u=0.0, double sigma=1.0)
Definition: NormRand.cpp:23
Vector.h
contains the definition of a Vector type
Matrix.h
contains the definition of a Matrix type
yarp::math::NormRand::init
static void init()
Initialize the random number generator, with current time (time(0)).
Definition: NormRand.cpp:56
yarp::math::NormRand::scalar
static double scalar(double u=0.0, double sigma=1.0)
Definition: NormRand.cpp:18
yarp::sig::VectorOf< double >
Rand.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
YARP_math_API
#define YARP_math_API
Definition: api.h:18
api.h
yarp::sig::Matrix
A class for a Matrix.
Definition: Matrix.h:46