YARP
Yet Another Robot Platform
RandVector.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_RANDVECTOR_H
8 #define YARP_MATH_RANDVECTOR_H
9 
10 #include <yarp/sig/Vector.h>
11 #include <yarp/math/RandScalar.h>
12 #include <yarp/math/api.h>
13 
14 namespace yarp {
15  namespace math {
16  namespace impl {
17  class RandVector;
18  }
19  }
20 }
21 
27 {
28  yarp::sig::Vector data;
29  RandScalar rnd;
30 
31 private:
32  RandVector(const RandVector &l);
33 
34 public:
35  RandVector(int s);
36 
37  void resize(int s);
38  void init();
39  void init(int seed);
40 
41  const yarp::sig::Vector &get();
42  const yarp::sig::Vector &get(const yarp::sig::Vector &min, const yarp::sig::Vector &max);
43 };
44 
45 #endif // YARP_MATH_RANDVECTOR_H
contains the definition of a Vector type
A random number generator, uniform in the range 0-1.
Definition: RandScalar.h:29
A class to generate random vectors, uniform distribution.
Definition: RandVector.h:27
const yarp::sig::Vector & get()
Definition: RandVector.cpp:34
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_math_API
Definition: api.h:17