python
gtsam
specializations
specializations/gtsam.h
Go to the documentation of this file.
1
/* Please refer to:
2
* https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html
3
* These are required to save one copy operation on Python calls.
4
*
5
* NOTES
6
* =================
7
*
8
* `py::bind_vector` and similar machinery gives the std container a Python-like
9
* interface, but without the `<pybind11/stl.h>` copying mechanism. Combined
10
* with `PYBIND11_MAKE_OPAQUE` this allows the types to be modified with Python,
11
* and saves one copy operation.
12
*/
13
14
/*
15
* Custom Pybind11 module for the Mersenne-Twister PRNG object
16
* `std::mt19937_64`.
17
* This can be invoked with `gtsam.MT19937()` and passed
18
* wherever a rng pointer is expected.
19
*/
20
#include <random>
21
py::class_<std::mt19937_64>(m_,
"MT19937"
)
22
.def(py::init<>())
23
.def(py::init<std::mt19937_64::result_type>())
24
.def(
"__call__"
, &std::mt19937_64::operator());
gtsam
Author(s):
autogenerated on Wed May 28 2025 03:01:23