pairinteraction
A Rydberg Interaction Calculator
eigen_compat.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Pairinteraction Developers
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4#pragma once
5
7
8#include <Eigen/Core>
9
10// Backport template aliases to older Eigen versions
11// https://eigen.tuxfamily.org/dox/group__matrixtypedefs.html
12#if !EIGEN_VERSION_AT_LEAST(3, 4, 0)
13namespace Eigen {
14template <typename Type>
15using MatrixX = Matrix<Type, Dynamic, Dynamic>;
16template <typename Type>
17using VectorX = Matrix<Type, Dynamic, 1>;
18template <typename Type>
19using Matrix3 = Matrix<Type, 3, 3>;
20template <typename Type>
21using Vector3 = Matrix<Type, 3, 1>;
22template <typename Type, int Size>
23using Vector = Matrix<Type, Size, 1>;
24} // namespace Eigen
25#endif
Matrix< Type, Size, 1 > Vector
Matrix< Type, 3, 1 > Vector3
Matrix< Type, 3, 3 > Matrix3
Matrix< Type, Dynamic, Dynamic > MatrixX
Matrix< Type, Dynamic, 1 > VectorX