floatSCHUR.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 1994-2012 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 3 of the License, or (at your
00010 option) any later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, see
00019 <http://www.gnu.org/licenses/>.
00020 
00021 */
00022 
00023 #if !defined (octave_FloatSCHUR_h)
00024 #define octave_FloatSCHUR_h 1
00025 
00026 #include <iosfwd>
00027 #include <string>
00028 
00029 #include "fMatrix.h"
00030 
00031 class
00032 OCTAVE_API
00033 FloatSCHUR
00034 {
00035 public:
00036 
00037   FloatSCHUR (void) : schur_mat (), unitary_mat (), selector (0) { }
00038 
00039   FloatSCHUR (const FloatMatrix& a, const std::string& ord,
00040               bool calc_unitary = true)
00041     : schur_mat (), unitary_mat (), selector (0)
00042     {
00043       init (a, ord, calc_unitary);
00044     }
00045 
00046   FloatSCHUR (const FloatMatrix& a, const std::string& ord, int& info,
00047               bool calc_unitary = true)
00048     : schur_mat (), unitary_mat (), selector (0)
00049     {
00050       info = init (a, ord, calc_unitary);
00051     }
00052 
00053   FloatSCHUR (const FloatSCHUR& a)
00054     : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat), selector (0)
00055     { }
00056 
00057   FloatSCHUR (const FloatMatrix& s, const FloatMatrix& u);
00058 
00059   FloatSCHUR& operator = (const FloatSCHUR& a)
00060     {
00061       if (this != &a)
00062         {
00063           schur_mat = a.schur_mat;
00064           unitary_mat = a.unitary_mat;
00065         }
00066       return *this;
00067     }
00068 
00069   ~FloatSCHUR (void) { }
00070 
00071   FloatMatrix schur_matrix (void) const { return schur_mat; }
00072 
00073   FloatMatrix unitary_matrix (void) const { return unitary_mat; }
00074 
00075   friend std::ostream& operator << (std::ostream& os, const FloatSCHUR& a);
00076 
00077   typedef octave_idx_type (*select_function) (const float&, const float&);
00078 
00079 private:
00080 
00081   FloatMatrix schur_mat;
00082   FloatMatrix unitary_mat;
00083 
00084   select_function selector;
00085 
00086   octave_idx_type init (const FloatMatrix& a, const std::string& ord, bool calc_unitary);
00087 };
00088 
00089 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines