Newer
Older
/*
* Copyright 2014-2019, CNRS
#include "eigenpy/computation-info.hpp"
#include "eigenpy/solvers/solvers.hpp"
#include "eigenpy/solvers/preconditioners.hpp"
Justin Carpentier
committed
#include "eigenpy/decompositions/decompositions.hpp"
#include "eigenpy/utils/is-approx.hpp"
BOOST_PYTHON_MODULE(eigenpy_pywrap)
namespace bp = boost::python;
bp::scope().attr("__version__") = eigenpy::printVersion();
bp::scope().attr("__raw_version__") = bp::str(EIGENPY_VERSION);
bp::def("checkVersionAtLeast",&eigenpy::checkVersionAtLeast,
bp::args("major_version","minor_version","patch_version"),
"Checks if the current version of EigenPy is at least the version provided by the input arguments.");
exposeComputationInfo();
bp::scope solvers = boost::python::class_<SolversScope>("solvers");
register_symbolic_link_to_registered_type<Eigen::ComputationInfo>();
{
using namespace Eigen;
bp::def("is_approx",(bool (*)(const Eigen::MatrixBase<MatrixXd> &, const Eigen::MatrixBase<MatrixXd> &, const double &))&is_approx<MatrixXd,MatrixXd>,
(bp::arg("A"),bp::arg("B"),bp::arg("prec") = 1e-12),
"Returns True if A is approximately equal to B, within the precision determined by prec.");
exposeDecompositions();