Add pybind11/stl.h and get it compiling
parent
3ba6566911
commit
d0279d2738
|
@ -41,45 +41,9 @@ class DSFMap {
|
||||||
std::map<KEY, This::Set> sets();
|
std::map<KEY, This::Set> sets();
|
||||||
};
|
};
|
||||||
|
|
||||||
class IndexPairSet {
|
|
||||||
IndexPairSet();
|
|
||||||
// common STL methods
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
void clear();
|
|
||||||
|
|
||||||
// structure specific methods
|
|
||||||
void insert(gtsam::IndexPair key);
|
|
||||||
bool erase(gtsam::IndexPair key); // returns true if value was removed
|
|
||||||
bool count(gtsam::IndexPair key) const; // returns true if value exists
|
|
||||||
};
|
|
||||||
|
|
||||||
class IndexPairVector {
|
|
||||||
IndexPairVector();
|
|
||||||
IndexPairVector(const gtsam::IndexPairVector& other);
|
|
||||||
|
|
||||||
// common STL methods
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
void clear();
|
|
||||||
|
|
||||||
// structure specific methods
|
|
||||||
gtsam::IndexPair at(size_t i) const;
|
|
||||||
void push_back(gtsam::IndexPair key) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtsam::IndexPairVector IndexPairSetAsArray(gtsam::IndexPairSet& set);
|
gtsam::IndexPairVector IndexPairSetAsArray(gtsam::IndexPairSet& set);
|
||||||
|
|
||||||
class IndexPairSetMap {
|
|
||||||
IndexPairSetMap();
|
|
||||||
// common STL methods
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
void clear();
|
|
||||||
|
|
||||||
// structure specific methods
|
|
||||||
gtsam::IndexPairSet at(gtsam::IndexPair& key);
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <gtsam/base/Matrix.h>
|
#include <gtsam/base/Matrix.h>
|
||||||
bool linear_independent(Matrix A, Matrix B, double tol);
|
bool linear_independent(Matrix A, Matrix B, double tol);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
{include_boost}
|
{include_boost}
|
||||||
|
|
||||||
#include <pybind11/eigen.h>
|
#include <pybind11/eigen.h>
|
||||||
|
#include <pybind11/stl.h>
|
||||||
#include <pybind11/stl_bind.h>
|
#include <pybind11/stl_bind.h>
|
||||||
#include <pybind11/pybind11.h>
|
#include <pybind11/pybind11.h>
|
||||||
#include <pybind11/operators.h>
|
#include <pybind11/operators.h>
|
||||||
|
|
|
@ -11,7 +11,4 @@
|
||||||
* and saves one copy operation.
|
* and saves one copy operation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
py::bind_map<gtsam::IndexPairSetMap>(m_, "IndexPairSetMap");
|
|
||||||
py::bind_vector<gtsam::IndexPairVector>(m_, "IndexPairVector");
|
|
||||||
|
|
||||||
py::bind_vector<std::vector<gtsam::Matrix> >(m_, "JacobianVector");
|
py::bind_vector<std::vector<gtsam::Matrix> >(m_, "JacobianVector");
|
||||||
|
|
Loading…
Reference in New Issue