|
|
|||
File indexing completed on 2026-07-06 07:48:33
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 #include "Acts/Utilities/StringHelpers.hpp" 0010 0011 #include <sstream> 0012 0013 #include <Eigen/Eigenvalues> 0014 0015 namespace Acts { 0016 0017 std::string printEigenDecomposition( 0018 const Eigen::Ref<const Eigen::MatrixXd>& mat) { 0019 // The matrix is assumed to be symmetric (e.g. a Hessian), so the 0020 // self-adjoint solver yields real eigen values and vectors and is 0021 // considerably cheaper to compile than the general Eigen::EigenSolver. 0022 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> eigenDecomp{mat}; 0023 0024 std::stringstream sstr{}; 0025 sstr << "eigen values: " << eigenDecomp.eigenvalues().transpose(); 0026 sstr << ", eigen vectors:\n" << eigenDecomp.eigenvectors(); 0027 return sstr.str(); 0028 } 0029 0030 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|