1 | // This file is part of Eigen, a lightweight C++ template library |
---|
2 | // for linear algebra. |
---|
3 | // |
---|
4 | // Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr> |
---|
5 | // |
---|
6 | // This Source Code Form is subject to the terms of the Mozilla |
---|
7 | // Public License v. 2.0. If a copy of the MPL was not distributed |
---|
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. |
---|
9 | |
---|
10 | #ifndef EIGEN2SUPPORT_H |
---|
11 | #define EIGEN2SUPPORT_H |
---|
12 | |
---|
13 | #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H)) |
---|
14 | #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header |
---|
15 | #endif |
---|
16 | |
---|
17 | #include "src/Core/util/DisableStupidWarnings.h" |
---|
18 | |
---|
19 | /** \ingroup Support_modules |
---|
20 | * \defgroup Eigen2Support_Module Eigen2 support module |
---|
21 | * This module provides a couple of deprecated functions improving the compatibility with Eigen2. |
---|
22 | * |
---|
23 | * To use it, define EIGEN2_SUPPORT before including any Eigen header |
---|
24 | * \code |
---|
25 | * #define EIGEN2_SUPPORT |
---|
26 | * \endcode |
---|
27 | * |
---|
28 | */ |
---|
29 | |
---|
30 | #include "src/Eigen2Support/Macros.h" |
---|
31 | #include "src/Eigen2Support/Memory.h" |
---|
32 | #include "src/Eigen2Support/Meta.h" |
---|
33 | #include "src/Eigen2Support/Lazy.h" |
---|
34 | #include "src/Eigen2Support/Cwise.h" |
---|
35 | #include "src/Eigen2Support/CwiseOperators.h" |
---|
36 | #include "src/Eigen2Support/TriangularSolver.h" |
---|
37 | #include "src/Eigen2Support/Block.h" |
---|
38 | #include "src/Eigen2Support/VectorBlock.h" |
---|
39 | #include "src/Eigen2Support/Minor.h" |
---|
40 | #include "src/Eigen2Support/MathFunctions.h" |
---|
41 | |
---|
42 | |
---|
43 | #include "src/Core/util/ReenableStupidWarnings.h" |
---|
44 | |
---|
45 | // Eigen2 used to include iostream |
---|
46 | #include<iostream> |
---|
47 | |
---|
48 | #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, SizeSuffix) \ |
---|
49 | using Eigen::Matrix##SizeSuffix##TypeSuffix; \ |
---|
50 | using Eigen::Vector##SizeSuffix##TypeSuffix; \ |
---|
51 | using Eigen::RowVector##SizeSuffix##TypeSuffix; |
---|
52 | |
---|
53 | #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(TypeSuffix) \ |
---|
54 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 2) \ |
---|
55 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 3) \ |
---|
56 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 4) \ |
---|
57 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, X) \ |
---|
58 | |
---|
59 | #define EIGEN_USING_MATRIX_TYPEDEFS \ |
---|
60 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(i) \ |
---|
61 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(f) \ |
---|
62 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(d) \ |
---|
63 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cf) \ |
---|
64 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cd) |
---|
65 | |
---|
66 | #define USING_PART_OF_NAMESPACE_EIGEN \ |
---|
67 | EIGEN_USING_MATRIX_TYPEDEFS \ |
---|
68 | using Eigen::Matrix; \ |
---|
69 | using Eigen::MatrixBase; \ |
---|
70 | using Eigen::ei_random; \ |
---|
71 | using Eigen::ei_real; \ |
---|
72 | using Eigen::ei_imag; \ |
---|
73 | using Eigen::ei_conj; \ |
---|
74 | using Eigen::ei_abs; \ |
---|
75 | using Eigen::ei_abs2; \ |
---|
76 | using Eigen::ei_sqrt; \ |
---|
77 | using Eigen::ei_exp; \ |
---|
78 | using Eigen::ei_log; \ |
---|
79 | using Eigen::ei_sin; \ |
---|
80 | using Eigen::ei_cos; |
---|
81 | |
---|
82 | #endif // EIGEN2SUPPORT_H |
---|