Anasazi
Version of the Day
|
An implementation of the Anasazi::SortManager that performs a collection of common sorting techniques. More...
#include <AnasaziBasicSort.hpp>
Public Member Functions | |
BasicSort (Teuchos::ParameterList &pl) | |
Parameter list driven constructor. More... | |
BasicSort (const std::string &which="LM") | |
String driven constructor. More... | |
virtual | ~BasicSort () |
Destructor. More... | |
void | setSortType (const std::string &which) |
Set sort type. More... | |
void | sort (std::vector< MagnitudeType > &evals, Teuchos::RCP< std::vector< int > > perm=Teuchos::null, int n=-1) const |
Sort real eigenvalues, optionally returning the permutation vector. More... | |
void | sort (std::vector< MagnitudeType > &r_evals, std::vector< MagnitudeType > &i_evals, Teuchos::RCP< std::vector< int > > perm=Teuchos::null, int n=-1) const |
Sort complex eigenvalues, optionally returning the permutation vector. More... | |
Public Member Functions inherited from Anasazi::SortManager< MagnitudeType > | |
SortManager () | |
Default constructor. More... | |
SortManager (Teuchos::ParameterList &pl) | |
Constructor accepting a Teuchos::ParameterList. This is the default mode for instantiating a SortManager. More... | |
virtual | ~SortManager () |
Destructor. More... | |
An implementation of the Anasazi::SortManager that performs a collection of common sorting techniques.
Definition at line 33 of file AnasaziBasicSort.hpp.
Anasazi::BasicSort< MagnitudeType >::BasicSort | ( | Teuchos::ParameterList & | pl | ) |
Parameter list driven constructor.
This constructor accepts a paramter list with the following options:
"Sort Strategy"
- a string
specifying the desired sorting strategy. See setSortType() for valid options. Definition at line 160 of file AnasaziBasicSort.hpp.
Anasazi::BasicSort< MagnitudeType >::BasicSort | ( | const std::string & | which = "LM" | ) |
String driven constructor.
Directly pass the string specifying sort strategy. See setSortType() for valid options.
Definition at line 168 of file AnasaziBasicSort.hpp.
|
virtual |
Destructor.
Definition at line 174 of file AnasaziBasicSort.hpp.
void Anasazi::BasicSort< MagnitudeType >::setSortType | ( | const std::string & | which | ) |
Set sort type.
which | [in] The eigenvalues of interest for this eigenproblem.
|
Definition at line 178 of file AnasaziBasicSort.hpp.
|
virtual |
Sort real eigenvalues, optionally returning the permutation vector.
evals | [in/out] Vector of length at least n containing the eigenvalues to be sorted. On output, the first n eigenvalues will be sorted. The rest will be unchanged. |
perm | [out] Vector of length at least n to store the permutation index (optional). If specified, on output the first n eigenvalues will contain the permutation indices, in the range [0,n-1] , such that evals_out[i] = evals_in[perm[i]] |
n | [in] Number of values in evals to be sorted. If n == -1 , all values will be sorted. |
Implements Anasazi::SortManager< MagnitudeType >.
Definition at line 207 of file AnasaziBasicSort.hpp.
|
virtual |
Sort complex eigenvalues, optionally returning the permutation vector.
This routine takes two vectors, one for each part of a complex eigenvalue. This is helpful for solving real, non-symmetric eigenvalue problems.
r_evals | [in/out] Vector of length at least n containing the real part of the eigenvalues to be sorted. On output, the first n eigenvalues will be sorted. The rest will be unchanged. |
i_evals | [in/out] Vector of length at least n containing the imaginary part of the eigenvalues to be sorted. On output, the first n eigenvalues will be sorted. The rest will be unchanged. |
perm | [out] Vector of length at least n to store the permutation index (optional). If specified, on output the first n eigenvalues will contain the permutation indices, in the range [0,n-1] , such that r_evals_out[i] = r_evals_in[perm[i]] and similarly for i_evals . |
n | [in] Number of values in r_evals , i_evals to be sorted. If n == -1 , all values will be sorted, as decided by the minimum of the length of r_evals and the length of i_evals . |
Implements Anasazi::SortManager< MagnitudeType >.
Definition at line 291 of file AnasaziBasicSort.hpp.