Skip to content
Snippets Groups Projects
main.cpp 978 B
Newer Older
/*
 * Copyright 2014-2019, CNRS
 * Copyright 2018-2019, INRIA
 */

#include "eigenpy/eigenpy.hpp"
#include "eigenpy/version.hpp"
#include "eigenpy/geometry.hpp"
#include "eigenpy/solvers/solvers.hpp"
#include "eigenpy/solvers/preconditioners.hpp"

#include <iostream>
jcarpent's avatar
jcarpent committed
#include <boost/python/scope.hpp>
jcarpent's avatar
jcarpent committed
using namespace eigenpy;

BOOST_PYTHON_MODULE(eigenpy)
{
jcarpent's avatar
jcarpent committed
  enableEigenPy();
  
  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.");
  
jcarpent's avatar
jcarpent committed
  exposeAngleAxis();
  exposeQuaternion();
  exposeGeometryConversion();
    boost::python::scope solvers = boost::python::class_<SolversScope>("solvers");
jcarpent's avatar
jcarpent committed
    exposeSolvers();
    exposePreconditioners();
  }