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 >:

Anasazi::SortManager< ScalarType, MV, OP > List of all members.

Public Member Functions

 BasicSort (const std::string which="LM")
 Constructor.
virtual ~BasicSort ()
 Destructor.
void setSortType (const std::string which)
 Set sort type.
void sort (Eigensolver< ScalarType, MV, OP > *solver, const int n, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &evals, std::vector< int > *perm=0) const
 Sort the vector of eigenvalues, optionally returning the permutation vector.
void sort (Eigensolver< ScalarType, MV, OP > *solver, const int n, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &r_evals, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &i_evals, std::vector< int > *perm=0) const
 Sort the vectors of eigenpairs, optionally returning the permutation vector.

Protected Attributes

std::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:
Chris Baker, Ulrich Hetmaniuk, Rich Lehoucq, and Heidi Thornquist
Examples:

BlockKrylovSchur/BlockKrylovSchurEpetraEx.cpp.

Definition at line 51 of file AnasaziBasicSort.hpp.


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Anasazi::BasicSort< ScalarType, MV, OP >::BasicSort ( const std::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

Definition at line 67 of file AnasaziBasicSort.hpp.

template<class ScalarType, class MV, class OP>
virtual Anasazi::BasicSort< ScalarType, MV, OP >::~BasicSort (  )  [inline, virtual]

Destructor.

Definition at line 72 of file AnasaziBasicSort.hpp.


Member Function Documentation

template<class ScalarType, class MV, class OP>
void Anasazi::BasicSort< ScalarType, MV, OP >::setSortType ( const std::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

Definition at line 86 of file AnasaziBasicSort.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicSort< ScalarType, MV, OP >::sort ( Eigensolver< ScalarType, MV, OP > *  solver,
const int  n,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  evals,
std::vector< int > *  perm = 0 
) const [virtual]

Sort the vector of eigenvalues, optionally returning the permutation vector.

Parameters:
solver [in] Eigensolver that is calling the sorting routine
n [in] Number of values in evals to be sorted.
evals [in/out] Vector of length n containing the eigenvalues to be sorted
perm [out] Vector of length n to store the permutation index (optional)

Implements Anasazi::SortManager< ScalarType, MV, OP >.

Definition at line 146 of file AnasaziBasicSort.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicSort< ScalarType, MV, OP >::sort ( Eigensolver< ScalarType, MV, OP > *  solver,
const int  n,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  r_evals,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  i_evals,
std::vector< int > *  perm = 0 
) const [virtual]

Sort the vectors of eigenpairs, 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.

Parameters:
solver [in] Eigensolver that is calling the sorting routine
n [in] Number of values in r_evals,i_evals to be sorted.
r_evals [in/out] Vector of length n containing the real part of the eigenvalues to be sorted
i_evals [in/out] Vector of length n containing the imaginary part of the eigenvalues to be sorted
perm [out] Vector of length n to store the permutation index (optional)

Implements Anasazi::SortManager< ScalarType, MV, OP >.

Definition at line 292 of file AnasaziBasicSort.hpp.


Member Data Documentation

template<class ScalarType, class MV, class OP>
std::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

Definition at line 141 of file AnasaziBasicSort.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:45:19 2009 for Anasazi by doxygen 1.4.7