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
02e96c2d
Commit
02e96c2d
authored
Jan 09, 2018
by
jcarpent
Browse files
[Core] Register by default both MatType and Ref<MatType>
parent
0ad69ef3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/eigenpy.cpp
View file @
02e96c2d
/*
* Copyright (c) 2015 LAAS-CNRS
* Copyright (c) 2015
-2018
LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
...
...
@@ -22,17 +22,18 @@ namespace eigenpy
/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
void
enableEigenPy
()
{
using
namespace
Eigen
;
Exception
::
registerException
();
enableEigenPySpecific
<
Eigen
::
MatrixXd
>
(
);
enableEigenPySpecific
<
Eigen
::
Matrix2d
>
(
);
enableEigenPySpecific
<
Eigen
::
Matrix3d
>
(
);
enableEigenPySpecific
<
Eigen
::
Matrix4d
>
(
);
enableEigenPySpecific
<
Eigen
::
VectorXd
>
(
);
enableEigenPySpecific
<
Eigen
::
Vector2d
>
(
);
enableEigenPySpecific
<
Eigen
::
Vector3d
>
(
);
enableEigenPySpecific
<
Eigen
::
Vector4d
>
(
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
MatrixXd
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Matrix2d
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Matrix3d
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Matrix4d
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
VectorXd
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Vector2d
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Vector3d
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Vector4d
);
}
}
// namespace eigenpy
src/eigenpy.hpp
View file @
02e96c2d
...
...
@@ -18,15 +18,18 @@
#define __eigenpy_eigenpy_hpp__
#include
"eigenpy/fwd.hpp"
#include
"eigenpy/memory.hpp"
#include
"eigenpy/deprecated.hh"
#include
"eigenpy/ref.hpp"
#define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE) \
enableEigenPySpecific<TYPE>(); \
enableEigenPySpecific< eigenpy::Ref<TYPE> >();
namespace
eigenpy
{
/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
void
enableEigenPy
();
template
<
typename
MatType
>
void
enableEigenPySpecific
();
...
...
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