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
7fc0f5e2
Verified
Commit
7fc0f5e2
authored
Feb 21, 2020
by
Justin Carpentier
Browse files
core: add default exposition of RowMajor Eigen types
parent
87f8c923
Changes
10
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/eigenpy.hpp
View file @
7fc0f5e2
...
...
@@ -24,28 +24,28 @@
#endif // if EIGEN_VERSION_AT_LEAST(3,2,0)
#define EIGENPY_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \
#define EIGENPY_MAKE_TYPEDEFS(Type,
Options,
TypeSuffix, Size, SizeSuffix) \
/** \ingroup matrixtypedefs */
\
typedef Eigen::Matrix<Type, Size, Size> Matrix##SizeSuffix##TypeSuffix; \
typedef Eigen::Matrix<Type, Size, Size
, Options
> Matrix##SizeSuffix##TypeSuffix; \
/** \ingroup matrixtypedefs */
\
typedef Eigen::Matrix<Type, Size, 1> Vector##SizeSuffix##TypeSuffix; \
/** \ingroup matrixtypedefs */
\
typedef Eigen::Matrix<Type, 1, Size> RowVector##SizeSuffix##TypeSuffix;
#define EIGENPY_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, Size) \
#define EIGENPY_MAKE_FIXED_TYPEDEFS(Type,
Options,
TypeSuffix, Size) \
/** \ingroup matrixtypedefs */
\
typedef Eigen::Matrix<Type, Size, Eigen::Dynamic> Matrix##Size##X##TypeSuffix; \
typedef Eigen::Matrix<Type, Size, Eigen::Dynamic
, Options
> Matrix##Size##X##TypeSuffix; \
/** \ingroup matrixtypedefs */
\
typedef Eigen::Matrix<Type, Eigen::Dynamic, Size> Matrix##X##Size##TypeSuffix;
typedef Eigen::Matrix<Type, Eigen::Dynamic, Size
, Options
> Matrix##X##Size##TypeSuffix;
#define EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \
EIGENPY_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \
EIGENPY_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \
EIGENPY_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \
EIGENPY_MAKE_TYPEDEFS(Type, TypeSuffix, Eigen::Dynamic, X) \
EIGENPY_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 2) \
EIGENPY_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 3) \
EIGENPY_MAKE_FIXED_TYPEDEFS(Type, TypeSuffix, 4)
#define EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Type,
Options,
TypeSuffix) \
EIGENPY_MAKE_TYPEDEFS(Type,
Options,
TypeSuffix, 2, 2) \
EIGENPY_MAKE_TYPEDEFS(Type,
Options,
TypeSuffix, 3, 3) \
EIGENPY_MAKE_TYPEDEFS(Type,
Options,
TypeSuffix, 4, 4) \
EIGENPY_MAKE_TYPEDEFS(Type,
Options,
TypeSuffix, Eigen::Dynamic, X) \
EIGENPY_MAKE_FIXED_TYPEDEFS(Type,
Options,
TypeSuffix, 2) \
EIGENPY_MAKE_FIXED_TYPEDEFS(Type,
Options,
TypeSuffix, 3) \
EIGENPY_MAKE_FIXED_TYPEDEFS(Type,
Options,
TypeSuffix, 4)
namespace
eigenpy
{
...
...
@@ -65,10 +65,10 @@ namespace eigenpy
template
<
typename
MatType
,
typename
EigenEquivalentType
>
EIGENPY_DEPRECATED
void
enableEigenPySpecific
();
template
<
typename
Scalar
>
template
<
typename
Scalar
,
int
Options
>
EIGEN_DONT_INLINE
void
exposeType
()
{
EIGENPY_MAKE_TYPEDEFS_ALL_SIZES
(
Scalar
,
s
);
EIGENPY_MAKE_TYPEDEFS_ALL_SIZES
(
Scalar
,
Options
,
s
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
Vector2s
);
ENABLE_SPECIFIC_MATRIX_TYPE
(
RowVector2s
);
...
...
@@ -93,6 +93,12 @@ namespace eigenpy
ENABLE_SPECIFIC_MATRIX_TYPE
(
MatrixXs
);
}
template
<
typename
Scalar
>
EIGEN_DONT_INLINE
void
exposeType
()
{
exposeType
<
Scalar
,
0
>
();
}
}
// namespace eigenpy
#include
"eigenpy/details.hpp"
...
...
src/eigenpy.cpp
View file @
7fc0f5e2
...
...
@@ -6,7 +6,6 @@
#include
"eigenpy/eigenpy.hpp"
#include
<stdlib.h>
namespace
eigenpy
{
...
...
src/matrix-complex-double.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixComplexDouble
()
{
exposeType
<
std
::
complex
<
double
>
>
();
exposeType
<
std
::
complex
<
double
>
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-complex-float.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixComplexFloat
()
{
exposeType
<
std
::
complex
<
float
>
>
();
exposeType
<
std
::
complex
<
float
>
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-complex-long-double.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixComplexLongDouble
()
{
exposeType
<
std
::
complex
<
long
double
>
>
();
exposeType
<
std
::
complex
<
long
double
>
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-double.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixDouble
()
{
exposeType
<
double
>
();
exposeType
<
double
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-float.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixFloat
()
{
exposeType
<
float
>
();
exposeType
<
float
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-int.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixInt
()
{
exposeType
<
int
>
();
exposeType
<
int
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-long-double.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixLongDouble
()
{
exposeType
<
long
double
>
();
exposeType
<
long
double
,
Eigen
::
RowMajor
>
();
}
}
src/matrix-long.cpp
View file @
7fc0f5e2
...
...
@@ -9,5 +9,6 @@ namespace eigenpy
void
exposeMatrixLong
()
{
exposeType
<
long
>
();
exposeType
<
long
,
Eigen
::
RowMajor
>
();
}
}
Write
Preview
Supports
Markdown
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