YARP
Yet Another Robot Platform
RandnVector.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_RANDNVECTOR_H
8 #define YARP_MATH_RANDNVECTOR_H
9 
10 #include <yarp/sig/Vector.h>
11 #include <yarp/math/RandnScalar.h>
12 #include <yarp/math/api.h>
13 
14 namespace yarp {
15  namespace math {
16  namespace impl {
17  class RandnVector;
18  }
19  }
20 }
21 
27 {
28  yarp::sig::Vector data;
29  RandnScalar rnd;
30  RandnVector(const RandnVector &l){};
31 
32 public:
33  RandnVector(int s);
34 
35  void resize(int s);
36  void init();
37  void init(int seed);
38 
39  const yarp::sig::Vector &get(const yarp::sig::Vector &u, const yarp::sig::Vector &sigma);
40  const yarp::sig::Vector &get(double u=0.0, double sigma=1.0);
41 };
42 
43 #endif // YARP_MATH_RANDNSCALAR_H
contains the definition of a Vector type
A random number generator, normal distribution.
Definition: RandnScalar.h:24
A class to generate random vectors, normal distribution.
Definition: RandnVector.h:27
const yarp::sig::Vector & get(const yarp::sig::Vector &u, const yarp::sig::Vector &sigma)
Definition: RandnVector.cpp:44
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_math_API
Definition: api.h:17