|
1 | 1 | /* |
2 | 2 | * Copyright 2014-2019, CNRS |
3 | | - * Copyright 2018-2020, INRIA |
| 3 | + * Copyright 2018-2021, INRIA |
4 | 4 | */ |
5 | 5 |
|
6 | 6 | #include "eigenpy/eigenpy.hpp" |
|
19 | 19 |
|
20 | 20 | using namespace eigenpy; |
21 | 21 |
|
22 | | -BOOST_PYTHON_MODULE(eigenpy) |
| 22 | +BOOST_PYTHON_MODULE(eigenpy_pywrap) |
23 | 23 | { |
24 | 24 | namespace bp = boost::python; |
25 | 25 | enableEigenPy(); |
26 | | - |
| 26 | + |
27 | 27 | bp::scope().attr("__version__") = eigenpy::printVersion(); |
28 | 28 | bp::scope().attr("__raw_version__") = bp::str(EIGENPY_VERSION); |
29 | 29 | bp::def("checkVersionAtLeast",&eigenpy::checkVersionAtLeast, |
30 | 30 | bp::args("major_version","minor_version","patch_version"), |
31 | 31 | "Checks if the current version of EigenPy is at least the version provided by the input arguments."); |
32 | | - |
| 32 | + |
33 | 33 | exposeAngleAxis(); |
34 | 34 | exposeQuaternion(); |
35 | 35 | exposeGeometryConversion(); |
36 | | - |
| 36 | + |
37 | 37 | exposeComputationInfo(); |
38 | | - |
| 38 | + |
39 | 39 | { |
40 | 40 | bp::scope solvers = boost::python::class_<SolversScope>("solvers"); |
41 | 41 | exposeSolvers(); |
42 | 42 | exposePreconditioners(); |
43 | | - |
| 43 | + |
44 | 44 | register_symbolic_link_to_registered_type<Eigen::ComputationInfo>(); |
45 | 45 | } |
46 | | - |
| 46 | + |
47 | 47 | { |
48 | 48 | using namespace Eigen; |
49 | | - |
| 49 | + |
50 | 50 | bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &, const double &))&is_approx<MatrixXd,MatrixXd>, |
51 | 51 | bp::args("A","B","prec"), |
52 | 52 | "Returns True if A is approximately equal to B, within the precision determined by prec."); |
53 | | - |
| 53 | + |
54 | 54 | bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &))&is_approx<MatrixXd,MatrixXd>, |
55 | 55 | bp::args("A","B"), |
56 | 56 | "Returns True if A is approximately equal to B."); |
57 | 57 | } |
58 | | - |
| 58 | + |
59 | 59 | exposeDecompositions(); |
60 | 60 | } |
0 commit comments