eigenpy 3.12.0
Bindings between Numpy and Eigen using Boost.Python
Loading...
Searching...
No Matches
EigenBase.hpp
1/*
2 * Copyright 2024 INRIA
3 */
4
5#ifndef __eigenpy_eigen_eigen_base_hpp__
6#define __eigenpy_eigen_eigen_base_hpp__
7
8#include "eigenpy/eigenpy.hpp"
9
10namespace eigenpy {
11
12template <typename Derived>
14 : public boost::python::def_visitor<EigenBaseVisitor<Derived>> {
15 template <class PyClass>
16 void visit(PyClass &cl) const {
17 cl.def("cols", &Derived::cols, bp::arg("self"),
18 "Returns the number of columns.")
19 .def("rows", &Derived::rows, bp::arg("self"),
20 "Returns the number of rows.")
21 .def("size", &Derived::rows, bp::arg("self"),
22 "Returns the number of coefficients, which is rows()*cols().");
23 }
24};
25
26} // namespace eigenpy
27
28#endif // ifndef __eigenpy_eigen_eigen_base_hpp__