Skip to content
GitLab
Menu
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
bc99ed26
Unverified
Commit
bc99ed26
authored
Apr 01, 2020
by
Justin Carpentier
Committed by
GitHub
Apr 01, 2020
Browse files
Merge pull request #180 from jcarpent/devel
Fix destruction of objects
parents
fb5c65c5
6821d3a7
Changes
8
Hide whitespace changes
Inline
Side-by-side
cmake
@
a5c65a0e
Compare
d1340a9e
...
a5c65a0e
Subproject commit
d1340a9e0340c443e5e8841c7ab4a0997f989e59
Subproject commit
a5c65a0ee51191be3f2e2667b95830706c211bb2
include/eigenpy/angle-axis.hpp
View file @
bc99ed26
/*
* Copyright 2014-2019, CNRS
* Copyright 2018-2019, INRIA
* Copyright 2014-2020 CNRS INRIA
*/
#ifndef __eigenpy_angle_axis_hpp__
#define __eigenpy_angle_axis_hpp__
#include "eigenpy/
fwd
.hpp"
#include "eigenpy/
eigenpy
.hpp"
#include <Eigen/Core>
#include <Eigen/Geometry>
...
...
include/eigenpy/decompositions/EigenSolver.hpp
View file @
bc99ed26
...
...
@@ -5,7 +5,8 @@
#ifndef __eigenpy_decomposition_eigen_solver_hpp__
#define __eigenpy_decomposition_eigen_solver_hpp__
#include <boost/python.hpp>
#include "eigenpy/eigenpy.hpp"
#include <Eigen/Core>
#include <Eigen/Eigenvalues>
...
...
include/eigenpy/decompositions/LDLT.hpp
View file @
bc99ed26
...
...
@@ -5,7 +5,8 @@
#ifndef __eigenpy_decomposition_ldlt_hpp__
#define __eigenpy_decomposition_ldlt_hpp__
#include <boost/python.hpp>
#include "eigenpy/eigenpy.hpp"
#include <Eigen/Core>
#include <Eigen/Cholesky>
...
...
include/eigenpy/decompositions/LLT.hpp
View file @
bc99ed26
...
...
@@ -5,7 +5,8 @@
#ifndef __eigenpy_decomposition_llt_hpp__
#define __eigenpy_decomposition_llt_hpp__
#include <boost/python.hpp>
#include "eigenpy/eigenpy.hpp"
#include <Eigen/Core>
#include <Eigen/Cholesky>
...
...
include/eigenpy/decompositions/SelfAdjointEigenSolver.hpp
View file @
bc99ed26
...
...
@@ -5,7 +5,8 @@
#ifndef __eigenpy_decomposition_self_adjoint_eigen_solver_hpp__
#define __eigenpy_decomposition_self_adjoint_eigen_solver_hpp__
#include <boost/python.hpp>
#include "eigenpy/eigenpy.hpp"
#include <Eigen/Core>
#include <Eigen/Eigenvalues>
...
...
include/eigenpy/eigen-from-python.hpp
View file @
bc99ed26
...
...
@@ -148,7 +148,7 @@ namespace boost { namespace python { namespace converter {
}
};
#define RVALUE_FROM_PYTHON_DATA_INIT(type) \
#define
EIGENPY_
RVALUE_FROM_PYTHON_DATA_INIT(type) \
typedef rvalue_from_python_data_eigen<type> Base; \
\
rvalue_from_python_data(rvalue_from_python_stage1_data const & _stage1) \
...
...
@@ -162,7 +162,7 @@ namespace boost { namespace python { namespace converter {
struct
rvalue_from_python_data
<
Eigen
::
MatrixBase
<
Derived
>
const
&>
:
rvalue_from_python_data_eigen
<
Derived
const
&>
{
RVALUE_FROM_PYTHON_DATA_INIT
(
Derived
const
&
)
EIGENPY_
RVALUE_FROM_PYTHON_DATA_INIT
(
Derived
const
&
)
};
/// \brief Template specialization of rvalue_from_python_data
...
...
@@ -170,11 +170,9 @@ namespace boost { namespace python { namespace converter {
struct
rvalue_from_python_data
<
Eigen
::
EigenBase
<
Derived
>
const
&>
:
rvalue_from_python_data_eigen
<
Derived
const
&>
{
RVALUE_FROM_PYTHON_DATA_INIT
(
Derived
const
&
)
EIGENPY_
RVALUE_FROM_PYTHON_DATA_INIT
(
Derived
const
&
)
};
#undef RVALUE_FROM_PYTHON_DATA_INIT
template
<
typename
MatType
,
int
Options
,
typename
Stride
>
struct
rvalue_from_python_data
<
Eigen
::
Ref
<
MatType
,
Options
,
Stride
>
&>
:
rvalue_from_python_storage
<
Eigen
::
Ref
<
MatType
,
Options
,
Stride
>
&>
...
...
include/eigenpy/quaternion.hpp
View file @
bc99ed26
/*
* Copyright 2014-2019, CNRS
* Copyright 2018-2019, INRIA
* Copyright 2014-2020 CNRS INRIA
*/
#ifndef __eigenpy_quaternion_hpp__
#define __eigenpy_quaternion_hpp__
#include "eigenpy/
fwd
.hpp"
#include "eigenpy/
eigenpy
.hpp"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include "eigenpy/exception.hpp"
namespace
boost
{
namespace
python
{
namespace
converter
{
/// \brief Template specialization of rvalue_from_python_data
template
<
typename
Quaternion
>
struct
rvalue_from_python_data
<
Eigen
::
QuaternionBase
<
Quaternion
>
const
&>
:
rvalue_from_python_data_eigen
<
Quaternion
const
&>
{
EIGENPY_RVALUE_FROM_PYTHON_DATA_INIT
(
Quaternion
const
&
)
};
template
<
class
Quaternion
>
struct
implicit
<
Quaternion
,
Eigen
::
QuaternionBase
<
Quaternion
>
>
{
typedef
Quaternion
Source
;
typedef
Eigen
::
QuaternionBase
<
Quaternion
>
Target
;
static
void
*
convertible
(
PyObject
*
obj
)
{
// Find a converter which can produce a Source instance from
// obj. The user has told us that Source can be converted to
// Target, and instantiating construct() below, ensures that
// at compile-time.
return
implicit_rvalue_convertible_from_python
(
obj
,
registered
<
Source
>::
converters
)
?
obj
:
0
;
}
static
void
construct
(
PyObject
*
obj
,
rvalue_from_python_stage1_data
*
data
)
{
void
*
storage
=
((
rvalue_from_python_storage
<
Target
>*
)
data
)
->
storage
.
bytes
;
arg_from_python
<
Source
>
get_source
(
obj
);
bool
convertible
=
get_source
.
convertible
();
BOOST_VERIFY
(
convertible
);
new
(
storage
)
Source
(
get_source
());
// record successful construction
data
->
convertible
=
storage
;
}
};
}}}
// namespace boost::python::converter
namespace
eigenpy
{
...
...
@@ -267,7 +309,7 @@ namespace eigenpy
// Cast to Eigen::QuaternionBase and vice-versa
bp
::
implicitly_convertible
<
Quaternion
,
QuaternionBase
>
();
bp
::
implicitly_convertible
<
QuaternionBase
,
Quaternion
>
();
//
bp::implicitly_convertible<QuaternionBase,Quaternion >();
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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