Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AnasaziSortManager.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Anasazi: Block Eigensolvers Package
4 //
5 // Copyright 2004 NTESS and the Anasazi contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef ANASAZI_SORTMANAGER_HPP
11 #define ANASAZI_SORTMANAGER_HPP
12 
27 #include "AnasaziConfigDefs.hpp"
28 #include "AnasaziTypes.hpp"
29 #include "Teuchos_Assert.hpp"
31 
32 
33 
34 namespace Anasazi {
35 
37 
38 
42  {public: SortManagerError(const std::string& what_arg) : AnasaziError(what_arg) {}};
43 
45 
46  template<class MagnitudeType>
47  class SortManager {
48 
49  public:
50 
53 
56 
58  virtual ~SortManager() {};
59 
70  virtual void sort(std::vector<MagnitudeType> &evals, Teuchos::RCP<std::vector<int> > perm = Teuchos::null, int n = -1) const = 0;
71 
90  virtual void sort(std::vector<MagnitudeType> &r_evals,
91  std::vector<MagnitudeType> &i_evals,
92  Teuchos::RCP<std::vector<int> > perm = Teuchos::null,
93  int n = -1) const = 0;
94 
95  };
96 
97 }
98 
99 #endif // ANASAZI_SORTMANAGER_HPP
100 
virtual void sort(std::vector< MagnitudeType > &evals, Teuchos::RCP< std::vector< int > > perm=Teuchos::null, int n=-1) const =0
Sort real eigenvalues, optionally returning the permutation vector.
An exception class parent to all Anasazi exceptions.
virtual ~SortManager()
Destructor.
SortManagerError is thrown when the Anasazi::SortManager is unable to sort the numbers, due to some failure of the sort method or error in calling it.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
SortManager()
Default constructor.
SortManager(Teuchos::ParameterList &pl)
Constructor accepting a Teuchos::ParameterList. This is the default mode for instantiating a SortMana...
Types and exceptions used within Anasazi solvers and interfaces.
Anasazi&#39;s templated pure virtual class for managing the sorting of approximate eigenvalues computed b...