YARP Yet Another Robot Platform
RandVector.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
5  *
6  * This software may be modified and distributed under the terms of the
8  */
9
10 #ifndef YARP_MATH_RANDVECTOR_H
11 #define YARP_MATH_RANDVECTOR_H
12
13 #include <yarp/sig/Vector.h>
14 #include <yarp/math/RandScalar.h>
15 #include <yarp/math/api.h>
16
17 namespace yarp {
18  namespace math {
19  namespace impl {
20  class RandVector;
21  }
22  }
23 }
24
30 {
31  yarp::sig::Vector data;
32  RandScalar rnd;
33
34 private:
35  RandVector(const RandVector &l);
36
37 public:
38  RandVector(int s);
39
40  void resize(int s);
41  void init();
42  void init(int seed);
43
44  const yarp::sig::Vector &get();
45  const yarp::sig::Vector &get(const yarp::sig::Vector &min, const yarp::sig::Vector &max);
46 };
47
48 #endif // YARP_MATH_RANDVECTOR_H
Vector.h
RandScalar.h
yarp::math::impl::RandVector
A class to generate random vectors, uniform distribution.
Definition: RandVector.h:29
yarp::sig::VectorOf< double >
yarp::math::impl::RandVector::resize
void resize(int s)
Definition: RandVector.cpp:22
yarp::math::impl::RandVector::get
const yarp::sig::Vector & get()
Definition: RandVector.cpp:37
YARP_math_API
#define YARP_math_API
Definition: api.h:18
yarp::math::RandScalar
A random number generator, uniform in the range 0-1.
Definition: RandScalar.h:31
yarp::math::impl::RandVector::init
void init()
Definition: RandVector.cpp:27
api.h
yarp
Definition: environment.h:18