CmplxSCHUR.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_ComplexSCHUR_h)
00024 #define octave_ComplexSCHUR_h 1
00025 
00026 #include <iosfwd>
00027 #include <string>
00028 
00029 #include "CMatrix.h"
00030 #include "dbleSCHUR.h"
00031 
00032 class
00033 OCTAVE_API
00034 ComplexSCHUR
00035 {
00036 public:
00037 
00038   ComplexSCHUR (void) : schur_mat (), unitary_mat (), selector (0) { }
00039 
00040   ComplexSCHUR (const ComplexMatrix& a, const std::string& ord,
00041                 bool calc_unitary = true)
00042     : schur_mat (), unitary_mat (), selector (0)
00043     {
00044       init (a, ord, calc_unitary);
00045     }
00046 
00047   ComplexSCHUR (const ComplexMatrix& a, const std::string& ord,
00048                 octave_idx_type& info,
00049                 bool calc_unitary = true)
00050     : schur_mat (), unitary_mat (), selector (0)
00051     {
00052       info = init (a, ord, calc_unitary);
00053     }
00054 
00055   ComplexSCHUR (const ComplexSCHUR& a)
00056     : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat), selector (0)
00057     { }
00058 
00059   ComplexSCHUR (const ComplexMatrix& s, const ComplexMatrix& u);
00060 
00061   ComplexSCHUR (const SCHUR& s);
00062 
00063   ComplexSCHUR& operator = (const ComplexSCHUR& a)
00064     {
00065       if (this != &a)
00066         {
00067           schur_mat = a.schur_mat;
00068           unitary_mat = a.unitary_mat;
00069         }
00070       return *this;
00071     }
00072 
00073   ~ComplexSCHUR (void) { }
00074 
00075   ComplexMatrix schur_matrix (void) const { return schur_mat; }
00076 
00077   ComplexMatrix unitary_matrix (void) const { return unitary_mat; }
00078 
00079   friend std::ostream& operator << (std::ostream& os, const ComplexSCHUR& a);
00080 
00081   typedef octave_idx_type (*select_function) (const Complex&);
00082 
00083 private:
00084 
00085   ComplexMatrix schur_mat;
00086   ComplexMatrix unitary_mat;
00087 
00088   select_function selector;
00089 
00090   octave_idx_type init (const ComplexMatrix& a, const std::string& ord, bool calc_unitary);
00091 };
00092 
00093 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines