Skip to content

Commit

Permalink
reduce pymrpt
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jun 22, 2023
1 parent 22f868d commit 8b1fa6a
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 102 deletions.
1 change: 0 additions & 1 deletion python/all_std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "src/std/stl_deque_1.cpp"
#include "src/std/stl_deque_2.cpp"
#include "src/std/stl_deque.cpp"
#include "src/std/stl_map_1.cpp"
#include "src/std/stl_map.cpp"
#include "src/std/stl_multimap.cpp"
#include "src/std/stl_vector.cpp"
Expand Down
15 changes: 0 additions & 15 deletions python/patch-001.diff
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,6 @@ index db3f49fde..793bf72f3 100644
void bind_std_stl_map(std::function< pybind11::module &(std::string const &namespace_) > &M)
{
{ // std::map file:bits/stl_map.h line:100
diff --git a/python/src/std/stl_map_1.cpp b/python/src/std/stl_map_1.cpp
index 935cd7342..307f4ad20 100644
--- a/python/src/std/stl_map_1.cpp
+++ b/python/src/std/stl_map_1.cpp
@@ -17,6 +17,10 @@
PYBIND11_MAKE_OPAQUE(std::shared_ptr<void>)
#endif

+PYBIND11_MAKE_OPAQUE(std::map<unsigned int,long>)
+PYBIND11_MAKE_OPAQUE(std::map<long,unsigned int>)
+
+
void bind_std_stl_map_1(std::function< pybind11::module &(std::string const &namespace_) > &M)
{
{ // std::map file:bits/stl_map.h line:100
diff --git a/python/src/std/stl_multimap.cpp b/python/src/std/stl_multimap.cpp
index ddbd20205..ccfa54684 100644
--- a/python/src/std/stl_multimap.cpp
Expand Down
5 changes: 4 additions & 1 deletion python/python.conf
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,7 @@
# further reduce size of pymrpt:
-class mrpt::obs::TPixelLabelInfo
-class mrpt::containers::deepcopy_poly_ptr
-class mrpt::typemeta::string_literal
-class mrpt::typemeta::string_literal
#
-class std::map<long,unsigned int>
-class std::map<unsigned int,long>
2 changes: 0 additions & 2 deletions python/src/mrpt/containers/bimap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ void bind_mrpt_containers_bimap(std::function< pybind11::module &(std::string co
cl.def( pybind11::init( [](mrpt::containers::bimap<long,unsigned int> const &o){ return new mrpt::containers::bimap<long,unsigned int>(o); } ) );
cl.def("size", (size_t (mrpt::containers::bimap<long,unsigned int>::*)() const) &mrpt::containers::bimap<long, unsigned int>::size, "C++: mrpt::containers::bimap<long, unsigned int>::size() const --> size_t");
cl.def("empty", (bool (mrpt::containers::bimap<long,unsigned int>::*)() const) &mrpt::containers::bimap<long, unsigned int>::empty, "C++: mrpt::containers::bimap<long, unsigned int>::empty() const --> bool");
cl.def("getDirectMap", (const class std::map<long, unsigned int> & (mrpt::containers::bimap<long,unsigned int>::*)() const) &mrpt::containers::bimap<long, unsigned int>::getDirectMap, "C++: mrpt::containers::bimap<long, unsigned int>::getDirectMap() const --> const class std::map<long, unsigned int> &", pybind11::return_value_policy::automatic);
cl.def("getInverseMap", (const class std::map<unsigned int, long> & (mrpt::containers::bimap<long,unsigned int>::*)() const) &mrpt::containers::bimap<long, unsigned int>::getInverseMap, "C++: mrpt::containers::bimap<long, unsigned int>::getInverseMap() const --> const class std::map<unsigned int, long> &", pybind11::return_value_policy::automatic);
cl.def("clear", (void (mrpt::containers::bimap<long,unsigned int>::*)()) &mrpt::containers::bimap<long, unsigned int>::clear, "C++: mrpt::containers::bimap<long, unsigned int>::clear() --> void");
cl.def("insert", (void (mrpt::containers::bimap<long,unsigned int>::*)(const long &, const unsigned int &)) &mrpt::containers::bimap<long, unsigned int>::insert, "C++: mrpt::containers::bimap<long, unsigned int>::insert(const long &, const unsigned int &) --> void", pybind11::arg("k"), pybind11::arg("v"));
cl.def("direct", (bool (mrpt::containers::bimap<long,unsigned int>::*)(const long &, unsigned int &) const) &mrpt::containers::bimap<long, unsigned int>::direct, "C++: mrpt::containers::bimap<long, unsigned int>::direct(const long &, unsigned int &) const --> bool", pybind11::arg("k"), pybind11::arg("out_v"));
Expand Down
2 changes: 0 additions & 2 deletions python/src/mrpt/slam/CIncrementalMapPartitioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ void bind_mrpt_slam_CIncrementalMapPartitioner(std::function< pybind11::module &
cl.def("changeCoordinatesOriginPoseIndex", (void (mrpt::slam::CIncrementalMapPartitioner::*)(unsigned int)) &mrpt::slam::CIncrementalMapPartitioner::changeCoordinatesOriginPoseIndex, "The new origin is given by the index of the pose that is to\n become the new origin.\n\nC++: mrpt::slam::CIncrementalMapPartitioner::changeCoordinatesOriginPoseIndex(unsigned int) --> void", pybind11::arg("newOriginPose"));
cl.def("setSimilarityMethod", (void (mrpt::slam::CIncrementalMapPartitioner::*)(enum mrpt::slam::similarity_method_t)) &mrpt::slam::CIncrementalMapPartitioner::setSimilarityMethod, "Select the similarity method to use for newly inserted keyframes \n\nC++: mrpt::slam::CIncrementalMapPartitioner::setSimilarityMethod(enum mrpt::slam::similarity_method_t) --> void", pybind11::arg("method"));
cl.def("setSimilarityMethod", (void (mrpt::slam::CIncrementalMapPartitioner::*)(class std::function<double (const struct mrpt::slam::map_keyframe_t &, const struct mrpt::slam::map_keyframe_t &, const class mrpt::poses::CPose3D &)>)) &mrpt::slam::CIncrementalMapPartitioner::setSimilarityMethod, "Sets a custom function for the similarity of new keyframes \n\nC++: mrpt::slam::CIncrementalMapPartitioner::setSimilarityMethod(class std::function<double (const struct mrpt::slam::map_keyframe_t &, const struct mrpt::slam::map_keyframe_t &, const class mrpt::poses::CPose3D &)>) --> void", pybind11::arg("func"));
cl.def("getAs3DScene", [](mrpt::slam::CIncrementalMapPartitioner const &o, class std::shared_ptr<class mrpt::opengl::CSetOfObjects> & a0) -> void { return o.getAs3DScene(a0); }, "", pybind11::arg("objs"));
cl.def("getAs3DScene", (void (mrpt::slam::CIncrementalMapPartitioner::*)(class std::shared_ptr<class mrpt::opengl::CSetOfObjects> &, const class std::map<unsigned int, long> *) const) &mrpt::slam::CIncrementalMapPartitioner::getAs3DScene, "@{ \n\nReturn a 3D representation of the graph: poses & links between them.\n The previous contents of \"objs\" will be discarded\n\nC++: mrpt::slam::CIncrementalMapPartitioner::getAs3DScene(class std::shared_ptr<class mrpt::opengl::CSetOfObjects> &, const class std::map<unsigned int, long> *) const --> void", pybind11::arg("objs"), pybind11::arg("renameIndexes"));
cl.def("getAdjacencyMatrix", (const class mrpt::math::CMatrixDynamic<double> & (mrpt::slam::CIncrementalMapPartitioner::*)() const) &mrpt::slam::CIncrementalMapPartitioner::getAdjacencyMatrix, "Return a const ref to the internal adjacency matrix. \n\nC++: mrpt::slam::CIncrementalMapPartitioner::getAdjacencyMatrix() const --> const class mrpt::math::CMatrixDynamic<double> &", pybind11::return_value_policy::automatic);
cl.def("getSequenceOfFrames", (class mrpt::maps::CSimpleMap * (mrpt::slam::CIncrementalMapPartitioner::*)()) &mrpt::slam::CIncrementalMapPartitioner::getSequenceOfFrames, "Access to the sequence of Sensory Frames \n\nC++: mrpt::slam::CIncrementalMapPartitioner::getSequenceOfFrames() --> class mrpt::maps::CSimpleMap *", pybind11::return_value_policy::automatic);
cl.def("assign", (class mrpt::slam::CIncrementalMapPartitioner & (mrpt::slam::CIncrementalMapPartitioner::*)(const class mrpt::slam::CIncrementalMapPartitioner &)) &mrpt::slam::CIncrementalMapPartitioner::operator=, "C++: mrpt::slam::CIncrementalMapPartitioner::operator=(const class mrpt::slam::CIncrementalMapPartitioner &) --> class mrpt::slam::CIncrementalMapPartitioner &", pybind11::return_value_policy::automatic, pybind11::arg(""));
Expand Down
2 changes: 0 additions & 2 deletions python/src/pymrpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ void bind_mrpt_rtti_CObject_3(std::function< pybind11::module &(std::string cons
void bind_mrpt_serialization_CSerializable(std::function< pybind11::module &(std::string const &namespace_) > &M);
void bind_std_stl_multimap(std::function< pybind11::module &(std::string const &namespace_) > &M);
void bind_std_stl_map(std::function< pybind11::module &(std::string const &namespace_) > &M);
void bind_std_stl_map_1(std::function< pybind11::module &(std::string const &namespace_) > &M);
void bind_mrpt_typemeta_TEnumType(std::function< pybind11::module &(std::string const &namespace_) > &M);
void bind_mrpt_typemeta_TEnumType_1(std::function< pybind11::module &(std::string const &namespace_) > &M);
void bind_mrpt_typemeta_TEnumType_2(std::function< pybind11::module &(std::string const &namespace_) > &M);
Expand Down Expand Up @@ -469,7 +468,6 @@ PYBIND11_MODULE(pymrpt, root_module) {
bind_mrpt_serialization_CSerializable(M);
bind_std_stl_multimap(M);
bind_std_stl_map(M);
bind_std_stl_map_1(M);
bind_mrpt_typemeta_TEnumType(M);
bind_mrpt_typemeta_TEnumType_1(M);
bind_mrpt_typemeta_TEnumType_2(M);
Expand Down
1 change: 0 additions & 1 deletion python/src/pymrpt.sources
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ mrpt/rtti/CObject_3.cpp
mrpt/serialization/CSerializable.cpp
std/stl_multimap.cpp
std/stl_map.cpp
std/stl_map_1.cpp
mrpt/typemeta/TEnumType.cpp
mrpt/typemeta/TEnumType_1.cpp
mrpt/typemeta/TEnumType_2.cpp
Expand Down
78 changes: 0 additions & 78 deletions python/src/std/stl_map_1.cpp

This file was deleted.

0 comments on commit 8b1fa6a

Please sign in to comment.