Skip to content
Snippets Groups Projects
Commit 51d1672e authored by pre-commit-ci[bot]'s avatar pre-commit-ci[bot] Committed by Wilson Jallet
Browse files

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
parent cdbe8e7b
No related branches found
No related tags found
No related merge requests found
#include "eigenpy/eigenpy.hpp"
#include "eigenpy/std-vector.hpp"
#include <ostream> #include <ostream>
#include <type_traits> #include <type_traits>
template<typename MatType> #include "eigenpy/eigenpy.hpp"
#include "eigenpy/std-vector.hpp"
template <typename MatType>
void printVectorOfMatrix(const std::vector<MatType> &Ms) { void printVectorOfMatrix(const std::vector<MatType> &Ms) {
const std::size_t n = Ms.size(); const std::size_t n = Ms.size();
for (std::size_t i = 0; i < n; i++) { for (std::size_t i = 0; i < n; i++) {
...@@ -13,13 +12,12 @@ void printVectorOfMatrix(const std::vector<MatType> &Ms) { ...@@ -13,13 +12,12 @@ void printVectorOfMatrix(const std::vector<MatType> &Ms) {
} }
} }
template<typename MatType> template <typename MatType>
std::vector<MatType> copy(const std::vector<MatType> &Ms) { std::vector<MatType> copy(const std::vector<MatType> &Ms) {
std::vector<MatType> out = Ms; std::vector<MatType> out = Ms;
return out; return out;
} }
BOOST_PYTHON_MODULE(vector) { BOOST_PYTHON_MODULE(vector) {
namespace bp = boost::python; namespace bp = boost::python;
...@@ -31,8 +29,8 @@ BOOST_PYTHON_MODULE(vector) { ...@@ -31,8 +29,8 @@ BOOST_PYTHON_MODULE(vector) {
bp::def("copyStdVector", copy<Eigen::MatrixXd>); bp::def("copyStdVector", copy<Eigen::MatrixXd>);
bp::def("copyStdVector", copy<Eigen::VectorXd>); bp::def("copyStdVector", copy<Eigen::VectorXd>);
eigenpy::StdVectorPythonVisitor<std::vector<Eigen::Matrix3d>>::expose("StdVec_Mat3d", "3D matrices."); eigenpy::StdVectorPythonVisitor<std::vector<Eigen::Matrix3d>>::expose(
"StdVec_Mat3d", "3D matrices.");
bp::def("printVectorOf3x3", printVectorOfMatrix<Eigen::Matrix3d>); bp::def("printVectorOf3x3", printVectorOfMatrix<Eigen::Matrix3d>);
bp::def("copyStdVec_3x3", copy<Eigen::Matrix3d>, bp::args("mats")); bp::def("copyStdVec_3x3", copy<Eigen::Matrix3d>, bp::args("mats"));
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment