Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
184828ef
Verified
Commit
184828ef
authored
Jan 29, 2020
by
Justin Carpentier
Browse files
core: move ComputationInfo to a dedicated file
parent
95e906be
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
184828ef
...
...
@@ -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
...
...
include/eigenpy/computation-info.hpp
0 → 100644
View file @
184828ef
/*
* 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__
python/main.cpp
View file @
184828ef
/*
* Copyright 2014-2019, CNRS
* Copyright 2018-20
19
, INRIA
* Copyright 2018-20
20
, 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
();
{
b
oost
::
python
::
scope
solvers
=
boost
::
python
::
class_
<
SolversScope
>
(
"solvers"
);
b
p
::
scope
solvers
=
boost
::
python
::
class_
<
SolversScope
>
(
"solvers"
);
exposeSolvers
();
exposePreconditioners
();
register_symbolic_link_to_registered_type
<
Eigen
::
ComputationInfo
>
();
}
exposeDecompositions
();
}
src/solvers/solvers.cpp
View file @
184828ef
/*
* 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment