Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-29 09:17:28

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 // Eigen deprecated `eulerAngles` in favor of `canonicalEulerAngles`
0012 
0013 #include <Eigen/Core>
0014 
0015 namespace Acts::detail::EigenCompat {
0016 
0017 template <typename Index, typename Derived>
0018 inline auto canonicalEulerAngles(const Eigen::MatrixBase<Derived>& matrix,
0019                                  Index a0, Index a1, Index a2)
0020     -> Eigen::Matrix<typename Eigen::MatrixBase<Derived>::Scalar, 3, 1> {
0021 #if EIGEN_VERSION_AT_LEAST(5, 0, 0)
0022   return matrix.canonicalEulerAngles(a0, a1, a2);
0023 #else
0024   return matrix.eulerAngles(a0, a1, a2);
0025 #endif
0026 }
0027 
0028 #if EIGEN_VERSION_AT_LEAST(5, 0, 0)
0029 constexpr auto all = Eigen::placeholders::all;
0030 #else
0031 static const auto all = Eigen::all;
0032 #endif
0033 
0034 }  // namespace Acts::detail::EigenCompat