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.

82 lines
2.6 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. #include "src/Core/util/DisableStupidWarnings.h"
  15. /** \ingroup Support_modules
  16. * \defgroup Eigen2Support_Module Eigen2 support module
  17. * This module provides a couple of deprecated functions improving the compatibility with Eigen2.
  18. *
  19. * To use it, define EIGEN2_SUPPORT before including any Eigen header
  20. * \code
  21. * #define EIGEN2_SUPPORT
  22. * \endcode
  23. *
  24. */
  25. #include "src/Eigen2Support/Macros.h"
  26. #include "src/Eigen2Support/Memory.h"
  27. #include "src/Eigen2Support/Meta.h"
  28. #include "src/Eigen2Support/Lazy.h"
  29. #include "src/Eigen2Support/Cwise.h"
  30. #include "src/Eigen2Support/CwiseOperators.h"
  31. #include "src/Eigen2Support/TriangularSolver.h"
  32. #include "src/Eigen2Support/Block.h"
  33. #include "src/Eigen2Support/VectorBlock.h"
  34. #include "src/Eigen2Support/Minor.h"
  35. #include "src/Eigen2Support/MathFunctions.h"
  36. #include "src/Core/util/ReenableStupidWarnings.h"
  37. // Eigen2 used to include iostream
  38. #include<iostream>
  39. #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, SizeSuffix) \
  40. using Eigen::Matrix##SizeSuffix##TypeSuffix; \
  41. using Eigen::Vector##SizeSuffix##TypeSuffix; \
  42. using Eigen::RowVector##SizeSuffix##TypeSuffix;
  43. #define EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(TypeSuffix) \
  44. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 2) \
  45. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 3) \
  46. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, 4) \
  47. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE_AND_SIZE(TypeSuffix, X) \
  48. #define EIGEN_USING_MATRIX_TYPEDEFS \
  49. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(i) \
  50. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(f) \
  51. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(d) \
  52. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cf) \
  53. EIGEN_USING_MATRIX_TYPEDEFS_FOR_TYPE(cd)
  54. #define USING_PART_OF_NAMESPACE_EIGEN \
  55. EIGEN_USING_MATRIX_TYPEDEFS \
  56. using Eigen::Matrix; \
  57. using Eigen::MatrixBase; \
  58. using Eigen::ei_random; \
  59. using Eigen::ei_real; \
  60. using Eigen::ei_imag; \
  61. using Eigen::ei_conj; \
  62. using Eigen::ei_abs; \
  63. using Eigen::ei_abs2; \
  64. using Eigen::ei_sqrt; \
  65. using Eigen::ei_exp; \
  66. using Eigen::ei_log; \
  67. using Eigen::ei_sin; \
  68. using Eigen::ei_cos;
  69. #endif // EIGEN2SUPPORT_H