Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 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 | #ifndef EIGEN_NO_EIGEN2_DEPRECATED_WARNING |
| 18 | |
| 19 | #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__) |
| 20 | #warning "Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)" |
| 21 | #else |
| 22 | #pragma message ("Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)") |
| 23 | #endif |
| 24 | |
| 25 | #endif // EIGEN_NO_EIGEN2_DEPRECATED_WARNING |
| 26 | |
| 27 | #include "src/Core/util/DisableStupidWarnings.h" |
| 28 | |
| 29 | /** \ingroup Support_modules |
| 30 | * \defgroup Eigen2Support_Module Eigen2 support module |
| 31 | * |
| 32 | * \warning Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. |
| 33 | * |
| 34 | * This module provides a couple of deprecated functions improving the compatibility with Eigen2. |
| 35 | * |
| 36 | * To use it, define EIGEN2_SUPPORT before including any Eigen header |
| 37 | * \code |
| 38 | * #define EIGEN2_SUPPORT |
| 39 | * \endcode |
| 40 | * |
| 41 | */ |
| 42 | |
| 43 | #include "src/Eigen2Support/Macros.h" |
| 44 | #include "src/Eigen2Support/Memory.h" |
| 45 | #include "src/Eigen2Support/Meta.h" |
| 46 | #include "src/Eigen2Support/Lazy.h" |
| 47 | #include "src/Eigen2Support/Cwise.h" |
| 48 | #include "src/Eigen2Support/CwiseOperators.h" |
| 49 | #include "src/Eigen2Support/TriangularSolver.h" |
| 50 | #include "src/Eigen2Support/Block.h" |
| 51 | #include "src/Eigen2Support/VectorBlock.h" |
| 52 | #include "src/Eigen2Support/Minor.h" |
| 53 | #include "src/Eigen2Support/MathFunctions.h" |
| 54 | |
| 55 | |
| 56 | #include "src/Core/util/ReenableStupidWarnings.h" |
| 57 | |
| 58 | // Eigen2 used to include iostream |
| 59 | #include<iostream> |
| 60 | |
| 61 | #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, SizeSuffix) \ |
| 62 | using Eigen::Matrix##SizeSuffix##TypeSuffix; \ |
| 63 | using Eigen::Vector##SizeSuffix##TypeSuffix; \ |
| 64 | using Eigen::RowVector##SizeSuffix##TypeSuffix; |
| 65 | |
| 66 | #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(TypeSuffix) \ |
| 67 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 2) \ |
| 68 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 3) \ |
| 69 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 4) \ |
| 70 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, X) \ |
| 71 | |
| 72 | #define EIGEN_USING_MATRIX_TYPEDEFS \ |
| 73 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(i) \ |
| 74 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(f) \ |
| 75 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(d) \ |
| 76 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cf) \ |
| 77 | EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cd) |
| 78 | |
| 79 | #define USING_PART_OF_NAMESPACE_EIGEN \ |
| 80 | EIGEN_USING_MATRIX_TYPEDEFS \ |
| 81 | using Eigen::Matrix; \ |
| 82 | using Eigen::MatrixBase; \ |
| 83 | using Eigen::ei_random; \ |
| 84 | using Eigen::ei_real; \ |
| 85 | using Eigen::ei_imag; \ |
| 86 | using Eigen::ei_conj; \ |
| 87 | using Eigen::ei_abs; \ |
| 88 | using Eigen::ei_abs2; \ |
| 89 | using Eigen::ei_sqrt; \ |
| 90 | using Eigen::ei_exp; \ |
| 91 | using Eigen::ei_log; \ |
| 92 | using Eigen::ei_sin; \ |
| 93 | using Eigen::ei_cos; |
| 94 | |
| 95 | #endif // EIGEN2SUPPORT_H |