getGeneralSortRule
C++ Function Reference
1 Signature
Spectra::SortRule BigDataStatMeth::getGeneralSortRule(const std::string &which)2 Description
Convert ‘which’ string to Spectra SortRule for general matrices.
3 Parameters
which(const std::string &): String indicating which eigenvalues to compute
4 Returns
Corresponding Spectra SortRule for general eigenproblems
5 Details
whichString indicating which eigenvalues to compute Corresponding Spectra SortRule for general eigenproblems
6 Caller Graph
7 Source Code
NoteImplementation
File: inst/include/hdf5Algebra/matrixEigenDecomposition.hpp • Lines 54-63
inline Spectra::SortRule getGeneralSortRule(const std::string& which) {
if (which == "LM") return Spectra::SortRule::LargestMagn;
if (which == "SM") return Spectra::SortRule::SmallestMagn;
if (which == "LR") return Spectra::SortRule::LargestReal;
if (which == "SR") return Spectra::SortRule::SmallestReal;
if (which == "LI") return Spectra::SortRule::LargestImag;
if (which == "SI") return Spectra::SortRule::SmallestImag;
// Default to largest magnitude for general matrices
return Spectra::SortRule::LargestMagn;
}8 Usage Example
#include "BigDataStatMeth.hpp"
// Example usage
auto result = getGeneralSortRule(...);