Verified Commit 184828ef authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: move ComputationInfo to a dedicated file

parent 95e906be
......@@ -84,6 +84,7 @@ SET(${PROJECT_NAME}_SOLVERS_HEADERS
SET(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_SOLVERS_HEADERS}
include/eigenpy/computation-info.hpp
include/eigenpy/eigenpy.hpp
include/eigenpy/exception.hpp
include/eigenpy/expose.hpp
......
/*
* Copyright 2020 INRIA
*/
#ifndef __eigenpy_decompositions_computation_info_hpp__
#define __eigenpy_decompositions_computation_info_hpp__
#include <Eigen/Core>
#include <boost/python.hpp>
#include "eigenpy/eigenpy_export.h"
namespace eigenpy
{
inline void EIGENPY_EXPORT exposeComputationInfo()
{
boost::python::enum_<Eigen::ComputationInfo>("ComputationInfo")
.value("Success",Eigen::Success)
.value("NumericalIssue",Eigen::NumericalIssue)
.value("NoConvergence",Eigen::NoConvergence)
.value("InvalidInput",Eigen::InvalidInput)
;
}
} // namespace eigenpy
#endif // define __eigenpy_decompositions_computation_info_hpp__
/*
* Copyright 2014-2019, CNRS
* Copyright 2018-2019, INRIA
* Copyright 2018-2020, INRIA
*/
#include "eigenpy/eigenpy.hpp"
#include "eigenpy/version.hpp"
#include "eigenpy/geometry.hpp"
#include "eigenpy/computation-info.hpp"
#include "eigenpy/solvers/solvers.hpp"
#include "eigenpy/solvers/preconditioners.hpp"
#include <iostream>
#include <boost/python/scope.hpp>
using namespace eigenpy;
BOOST_PYTHON_MODULE(eigenpy)
{
namespace bp = boost::python;
enableEigenPy();
bp::scope().attr("__version__") = eigenpy::printVersion();
......@@ -28,10 +31,15 @@ BOOST_PYTHON_MODULE(eigenpy)
exposeQuaternion();
exposeGeometryConversion();
exposeComputationInfo();
{
boost::python::scope solvers = boost::python::class_<SolversScope>("solvers");
bp::scope solvers = boost::python::class_<SolversScope>("solvers");
exposeSolvers();
exposePreconditioners();
register_symbolic_link_to_registered_type<Eigen::ComputationInfo>();
}
exposeDecompositions();
}
/*
* Copyright 2017-2018, Justin Carpentier, LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* eigenpy is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. You should
* have received a copy of the GNU Lesser General Public License along
* with eigenpy. If not, see <http://www.gnu.org/licenses/>.
* Copyright 2017-2020 CNRS INRIA
*/
#include <Eigen/Core>
......@@ -38,13 +26,6 @@ namespace eigenpy
// Conjugate gradient with limited BFGS preconditioner
ConjugateGradientVisitor< ConjugateGradient<MatrixXd,Lower|Upper,IdentityPreconditioner > >::expose("IdentityConjugateGradient");
// ConjugateGradientVisitor< ConjugateGradient<MatrixXd,Lower|Upper,LimitedBFGSPreconditioner<double,Dynamic,Lower|Upper> > >::expose("LimitedBFGSConjugateGradient");
boost::python::enum_<Eigen::ComputationInfo>("ComputationInfo")
.value("Success",Eigen::Success)
.value("NumericalIssue",Eigen::NumericalIssue)
.value("NoConvergence",Eigen::NoConvergence)
.value("InvalidInput",Eigen::InvalidInput)
;
}
} // namespace eigenpy
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment