You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
3.2 KiB

  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. #ifndef EIGEN2SUPPORT_H
  10. #define EIGEN2SUPPORT_H
  11. #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H))
  12. #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header
  13. #endif
  14. #ifndef EIGEN_NO_EIGEN2_DEPRECATED_WARNING
  15. #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
  16. #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)"
  17. #else
  18. #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)")
  19. #endif
  20. #endif // EIGEN_NO_EIGEN2_DEPRECATED_WARNING
  21. #include "src/Core/util/DisableStupidWarnings.h"
  22. /** \ingroup Support_modules
  23. * \defgroup Eigen2Support_Module Eigen2 support module
  24. *
  25. * \warning Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3.
  26. *
  27. * This module provides a couple of deprecated functions improving the compatibility with Eigen2.
  28. *
  29. * To use it, define EIGEN2_SUPPORT before including any Eigen header
  30. * \code
  31. * #define EIGEN2_SUPPORT
  32. * \endcode
  33. *
  34. */
  35. #include "src/Eigen2Support/Macros.h"
  36. #include "src/Eigen2Support/Memory.h"
  37. #include "src/Eigen2Support/Meta.h"
  38. #include "src/Eigen2Support/Lazy.h"
  39. #include "src/Eigen2Support/Cwise.h"
  40. #include "src/Eigen2Support/CwiseOperators.h"
  41. #include "src/Eigen2Support/TriangularSolver.h"
  42. #include "src/Eigen2Support/Block.h"
  43. #include "src/Eigen2Support/VectorBlock.h"
  44. #include "src/Eigen2Support/Minor.h"
  45. #include "src/Eigen2Support/MathFunctions.h"
  46. #include "src/Core/util/ReenableStupidWarnings.h"
  47. // Eigen2 used to include iostream
  48. #include<iostream>
  49. #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, SizeSuffix) \
  50. using Eigen::Matrix##SizeSuffix##TypeSuffix; \
  51. using Eigen::Vector##SizeSuffix##TypeSuffix; \
  52. using Eigen::RowVector##SizeSuffix##TypeSuffix;
  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. #define EIGEN_USING_MATRIX_TYPEDEFS \
  59. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(i) \
  60. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(f) \
  61. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(d) \
  62. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cf) \
  63. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cd)
  64. #define USING_PART_OF_NAMESPACE_EIGEN \
  65. EIGEN_USING_MATRIX_TYPEDEFS \
  66. using Eigen::Matrix; \
  67. using Eigen::MatrixBase; \
  68. using Eigen::ei_random; \
  69. using Eigen::ei_real; \
  70. using Eigen::ei_imag; \
  71. using Eigen::ei_conj; \
  72. using Eigen::ei_abs; \
  73. using Eigen::ei_abs2; \
  74. using Eigen::ei_sqrt; \
  75. using Eigen::ei_exp; \
  76. using Eigen::ei_log; \
  77. using Eigen::ei_sin; \
  78. using Eigen::ei_cos;
  79. #endif // EIGEN2SUPPORT_H