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 &)

4 Returns

Type: Spectra::SortRule

5 Caller Graph

Function dependencies

6 Source Code

File: inst/include/hdf5Algebra/matrixEigenDecomposition.hppLines 51-59

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;
        return Spectra::SortRule::LargestMagn;
    }

7 Usage Example

#include "BigDataStatMeth.hpp"

// Example usage
auto result = getGeneralSortRule(...);