Anasazi::BasicSort< ScalarType, MV, OP > Class Template Reference

An implementation of the Anasazi::SortManager that performs a collection of common sorting techniques. More...

#include <AnasaziBasicSort.hpp>

Inheritance diagram for Anasazi::BasicSort< ScalarType, MV, OP >:

[legend]
Collaboration diagram for Anasazi::BasicSort< ScalarType, MV, OP >:
[legend]
List of all members.

Public Member Functions

 BasicSort (const string which="LM")
 Constructor.
virtual ~BasicSort ()
 Destructor.
void SetSortType (const string which)
 Set sort type.
ReturnType sort (Eigensolver< ScalarType, MV, OP > *solver, int n, ScalarType *evals, std::vector< int > *perm=0) const
 Sort the vector of eigenvalues with respect to the chosen sorting type, optionally returning the permutation vector.
ReturnType sort (Eigensolver< ScalarType, MV, OP > *solver, int n, ScalarType *r_evals, ScalarType *i_evals, std::vector< int > *perm=0) const
 Sort the vectors of eigenpairs with respect to the chosen sorting type, optionally returning the permutation vector.

Protected Attributes

string _which
 Sorting type.

Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::BasicSort< ScalarType, MV, OP >

An implementation of the Anasazi::SortManager that performs a collection of common sorting techniques.

Author:
Ulrich Hetmaniuk, Rich Lehoucq, and Heidi Thornquist


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Anasazi::BasicSort< ScalarType, MV, OP >::BasicSort const string  which = "LM"  )  [inline]
 

Constructor.

Parameters:
which [in] The eigenvalues of interest for this eigenproblem.
  • "LM" - Largest Magnitude [ default ]
  • "SM" - Smallest Magnitude
  • "LR" - Largest Real
  • "SR" - Smallest Real
  • "LI" - Largest Imaginary
  • "SI" - Smallest Imaginary


Member Function Documentation

template<class ScalarType, class MV, class OP>
void Anasazi::BasicSort< ScalarType, MV, OP >::SetSortType const string  which  )  [inline]
 

Set sort type.

Parameters:
which [in] The eigenvalues of interest for this eigenproblem.
  • "LM" - Largest Magnitude [ default ]
  • "SM" - Smallest Magnitude
  • "LR" - Largest Real
  • "SR" - Smallest Real
  • "LI" - Largest Imaginary
  • "SI" - Smallest Imaginary

template<class ScalarType, class MV, class OP>
ReturnType Anasazi::BasicSort< ScalarType, MV, OP >::sort Eigensolver< ScalarType, MV, OP > *  solver,
int  n,
ScalarType *  r_evals,
ScalarType *  i_evals,
std::vector< int > *  perm = 0
const [virtual]
 

Sort the vectors of eigenpairs with respect to the chosen sorting type, optionally returning the permutation vector.

Parameters:
solver [in] Eigensolver that is calling the sorting routine
n [in] Size of the array
r_evals [in/out] Array of length n containing the real part of the eigenvalues to be sorted
i_evals [in/out] Array of length n containing the imaginary part of the eigenvalues to be sorted
perm [out] Vector of length n to store the permutation (optional)
Returns:
Returns the status of the sorting routine [ Undefined by default ]

Reimplemented from Anasazi::SortManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
ReturnType Anasazi::BasicSort< ScalarType, MV, OP >::sort Eigensolver< ScalarType, MV, OP > *  solver,
int  n,
ScalarType *  evals,
std::vector< int > *  perm = 0
const [virtual]
 

Sort the vector of eigenvalues with respect to the chosen sorting type, optionally returning the permutation vector.

Parameters:
solver [in] Eigensolver that is calling the sorting routine
n [in] Size of the array
evals [in/out] Array of length n containing the eigenvalues to be sorted
perm [out] Vector of length n to store the permutation (optional)
Returns:
Returns the status of the sorting routine [ Undefined by default ]

Reimplemented from Anasazi::SortManager< ScalarType, MV, OP >.


Member Data Documentation

template<class ScalarType, class MV, class OP>
string Anasazi::BasicSort< ScalarType, MV, OP >::_which [protected]
 

Sorting type.

Note:
Sorting choices:
  • "LM" - Largest Magnitude [ default ]
  • "SM" - Smallest Magnitude
  • "LR" - Largest Real
  • "SR" - Smallest Real
  • "LI" - Largest Imaginary
  • "SI" - Smallest Imaginary


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:41:36 2008 for Anasazi by doxygen 1.3.9.1