16 m_.doc() =
"pybind11 wrapper of inheritance_py";
19 py::class_<MyBase, std::shared_ptr<MyBase>>(m_,
"MyBase");
21 py::class_<MyTemplate<gtsam::Point2>, MyBase, std::shared_ptr<MyTemplate<gtsam::Point2>>>(m_,
"MyTemplatePoint2")
27 .def(
"accept_T",[](MyTemplate<gtsam::Point2>*
self,
const gtsam::Point2&
value){
self->accept_T(value);},
py::arg(
"value"))
28 .def(
"accept_Tptr",[](MyTemplate<gtsam::Point2>*
self, std::shared_ptr<gtsam::Point2> value){
self->accept_Tptr(value);},
py::arg(
"value"))
29 .def(
"return_Tptr",[](MyTemplate<gtsam::Point2>*
self, std::shared_ptr<gtsam::Point2> value){
return self->return_Tptr(value);},
py::arg(
"value"))
30 .def(
"return_T",[](MyTemplate<gtsam::Point2>*
self,
gtsam::Point2* value){
return self->return_T(value);},
py::arg(
"value"))
31 .def(
"create_ptrs",[](MyTemplate<gtsam::Point2>*
self){
return self->create_ptrs();})
32 .def(
"create_MixedPtrs",[](MyTemplate<gtsam::Point2>*
self){
return self->create_MixedPtrs();})
33 .def(
"return_ptrs",[](MyTemplate<gtsam::Point2>*
self, std::shared_ptr<gtsam::Point2>
p1, std::shared_ptr<gtsam::Point2>
p2){
return self->return_ptrs(p1, p2);},
py::arg(
"p1"),
py::arg(
"p2"))
34 .def_static(
"Level",[](
const gtsam::Point2&
K){
return MyTemplate<gtsam::Point2>::Level(K);},
py::arg(
"K"));
36 py::class_<MyTemplate<gtsam::Matrix>, MyBase, std::shared_ptr<MyTemplate<gtsam::Matrix>>>(m_,
"MyTemplateMatrix")
42 .def(
"accept_T",[](MyTemplate<gtsam::Matrix>*
self,
const gtsam::Matrix& value){
self->accept_T(value);},
py::arg(
"value"))
43 .def(
"accept_Tptr",[](MyTemplate<gtsam::Matrix>*
self,
const std::shared_ptr<gtsam::Matrix> value){
self->accept_Tptr(value);},
py::arg(
"value"))
44 .def(
"return_Tptr",[](MyTemplate<gtsam::Matrix>*
self,
const std::shared_ptr<gtsam::Matrix> value){
return self->return_Tptr(value);},
py::arg(
"value"))
45 .def(
"return_T",[](MyTemplate<gtsam::Matrix>*
self,
const gtsam::Matrix* value){
return self->return_T(value);},
py::arg(
"value"))
46 .def(
"create_ptrs",[](MyTemplate<gtsam::Matrix>*
self){
return self->create_ptrs();})
47 .def(
"create_MixedPtrs",[](MyTemplate<gtsam::Matrix>*
self){
return self->create_MixedPtrs();})
48 .def(
"return_ptrs",[](MyTemplate<gtsam::Matrix>*
self,
const std::shared_ptr<gtsam::Matrix> p1,
const std::shared_ptr<gtsam::Matrix> p2){
return self->return_ptrs(p1, p2);},
py::arg(
"p1"),
py::arg(
"p2"))
49 .def_static(
"Level",[](
const gtsam::Matrix& K){
return MyTemplate<gtsam::Matrix>::Level(K);},
py::arg(
"K"));
51 py::class_<MyTemplate<A>, MyBase, std::shared_ptr<MyTemplate<A>>>(m_,
"MyTemplateA")
57 .def(
"accept_T",[](MyTemplate<A>*
self,
const A& value){
self->accept_T(value);},
py::arg(
"value"))
58 .def(
"accept_Tptr",[](MyTemplate<A>*
self, std::shared_ptr<A> value){
self->accept_Tptr(value);},
py::arg(
"value"))
59 .def(
"return_Tptr",[](MyTemplate<A>*
self, std::shared_ptr<A> value){
return self->return_Tptr(value);},
py::arg(
"value"))
60 .def(
"return_T",[](MyTemplate<A>*
self,
A* value){
return self->return_T(value);},
py::arg(
"value"))
61 .def(
"create_ptrs",[](MyTemplate<A>*
self){
return self->create_ptrs();})
62 .def(
"create_MixedPtrs",[](MyTemplate<A>*
self){
return self->create_MixedPtrs();})
63 .def(
"return_ptrs",[](MyTemplate<A>*
self, std::shared_ptr<A> p1, std::shared_ptr<A> p2){
return self->return_ptrs(p1, p2);},
py::arg(
"p1"),
py::arg(
"p2"))
64 .def_static(
"Level",[](
const A& K){
return MyTemplate<A>::Level(K);},
py::arg(
"K"));
66 py::class_<ForwardKinematicsFactor, gtsam::BetweenFactor<gtsam::Pose3>, std::shared_ptr<ForwardKinematicsFactor>>(m_,
"ForwardKinematicsFactor");
68 py::class_<ParentHasTemplate<double>, MyTemplate<double>, std::shared_ptr<ParentHasTemplate<double>>>(m_,
"ParentHasTemplateDouble");
71 #include "python/specializations.h"
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
PYBIND11_MODULE(inheritance_py, m_)