eigenpy.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019, CNRS
3  * Copyright 2018-2020, INRIA
4  */
5 
6 #ifndef __eigenpy_eigenpy_hpp__
7 #define __eigenpy_eigenpy_hpp__
8 
9 #include "eigenpy/fwd.hpp"
10 #include "eigenpy/deprecated.hpp"
12 
13 #define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE) \
14  ::eigenpy::enableEigenPySpecific<TYPE>();
15 
16 namespace eigenpy
17 {
18 
19  /* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
20  void EIGENPY_DLLAPI enableEigenPy();
21 
22  /* Enable the Eigen--Numpy serialization for the templated MatrixBase class.
23  * The second template argument is used for inheritance of Eigen classes. If
24  * using a native Eigen::MatrixBase, simply repeat the same arg twice. */
25  template<typename MatType>
26  void enableEigenPySpecific();
27 
28  /* Enable the Eigen--Numpy serialization for the templated MatrixBase class.
29  * The second template argument is used for inheritance of Eigen classes. If
30  * using a native Eigen::MatrixBase, simply repeat the same arg twice. */
31  template<typename MatType,typename EigenEquivalentType>
32  EIGENPY_DEPRECATED void enableEigenPySpecific();
33 
34  template<typename Scalar, int Options>
35  EIGEN_DONT_INLINE void exposeType()
36  {
37  EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Scalar,Options,s);
38 
40  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector2s);
42  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix2Xs);
43  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX2s);
44 
46  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector3s);
48  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix3Xs);
49  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX3s);
50 
52  ENABLE_SPECIFIC_MATRIX_TYPE(RowVector4s);
54  ENABLE_SPECIFIC_MATRIX_TYPE(Matrix4Xs);
55  ENABLE_SPECIFIC_MATRIX_TYPE(MatrixX4s);
56 
58  ENABLE_SPECIFIC_MATRIX_TYPE(RowVectorXs);
60  }
61 
62  template<typename Scalar>
63  EIGEN_DONT_INLINE void exposeType()
64  {
65  exposeType<Scalar,0>();
66  }
67 
68 } // namespace eigenpy
69 
70 #include "eigenpy/details.hpp"
71 
72 #endif // ifndef __eigenpy_eigenpy_hpp__
#define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE)
Definition: eigenpy.hpp:13
EIGENPY_DEPRECATED void enableEigenPySpecific()
Definition: details.hpp:72
EIGEN_DONT_INLINE void exposeType()
Definition: eigenpy.hpp:35
void EIGENPY_DLLAPI enableEigenPy()
Definition: eigenpy.cpp:29
#define EIGENPY_MAKE_TYPEDEFS_ALL_SIZES(Type, Options, TypeSuffix)


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59