We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2608e8 commit 0cb83f1Copy full SHA for 0cb83f1
src/eigenpy.cpp
@@ -4,10 +4,16 @@
4
*/
5
6
#include "eigenpy/eigenpy.hpp"
7
+#include <stdlib.h>
8
9
namespace eigenpy
10
{
11
12
+ void seed(unsigned int seed_value)
13
+ {
14
+ srand(seed_value);
15
+ }
16
+
17
/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instances. */
18
void enableEigenPy()
19
@@ -27,6 +33,9 @@ namespace eigenpy
27
33
28
34
bp::def("switchToNumpyMatrix",&NumpyType::switchToNumpyMatrix,
29
35
"Set the conversion from Eigen::Matrix to numpy.matrix.");
36
37
+ bp::def("seed",&seed,bp::arg("seed_value"),
38
+ "Initialize the pseudo-random number generator with the argument seed_value.");
30
39
31
40
ENABLE_SPECIFIC_MATRIX_TYPE(Matrix2d);
32
41
ENABLE_SPECIFIC_MATRIX_TYPE(Matrix2f);
0 commit comments