Anasazi  Version of the Day
AnasaziSortManager.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Anasazi: Block Eigensolvers Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 
29 #ifndef ANASAZI_SORTMANAGER_HPP
30 #define ANASAZI_SORTMANAGER_HPP
31 
46 #include "AnasaziConfigDefs.hpp"
47 #include "AnasaziTypes.hpp"
48 #include "Teuchos_Assert.hpp"
49 #include "Teuchos_ParameterList.hpp"
50 
51 
52 
53 namespace Anasazi {
54 
56 
57 
61  {public: SortManagerError(const std::string& what_arg) : AnasaziError(what_arg) {}};
62 
64 
65  template<class MagnitudeType>
66  class SortManager {
67 
68  public:
69 
72 
74  SortManager(Teuchos::ParameterList &pl) {};
75 
77  virtual ~SortManager() {};
78 
89  virtual void sort(std::vector<MagnitudeType> &evals, Teuchos::RCP<std::vector<int> > perm = Teuchos::null, int n = -1) const = 0;
90 
109  virtual void sort(std::vector<MagnitudeType> &r_evals,
110  std::vector<MagnitudeType> &i_evals,
111  Teuchos::RCP<std::vector<int> > perm = Teuchos::null,
112  int n = -1) const = 0;
113 
114  };
115 
116 }
117 
118 #endif // ANASAZI_SORTMANAGER_HPP
119 
An exception class parent to all Anasazi exceptions.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package...
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...