メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

CDiagMatrix.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 1996, 1997 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 2, or (at your option) any
00010 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, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00021 */
00022 
00023 #if !defined (octave_ComplexDiagMatrix_h)
00024 #define octave_ComplexDiagMatrix_h 1
00025 
00026 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029 
00030 #include "MDiagArray2.h"
00031 
00032 #include "dRowVector.h"
00033 #include "CRowVector.h"
00034 #include "dColVector.h"
00035 #include "CColVector.h"
00036 
00037 #include "mx-defs.h"
00038 
00039 class
00040 ComplexDiagMatrix : public MDiagArray2<Complex>
00041 {
00042 public:
00043 
00044   ComplexDiagMatrix (void) : MDiagArray2<Complex> () { }
00045 
00046   ComplexDiagMatrix (int r, int c) : MDiagArray2<Complex> (r, c) { }
00047 
00048   ComplexDiagMatrix (int r, int c, const Complex& val)
00049     : MDiagArray2<Complex> (r, c, val) { }
00050 
00051   explicit ComplexDiagMatrix (const RowVector& a)
00052     : MDiagArray2<Complex> (ComplexRowVector (a)) { }
00053 
00054   explicit ComplexDiagMatrix (const ComplexRowVector& a)
00055     : MDiagArray2<Complex> (a) { }
00056 
00057   explicit ComplexDiagMatrix (const ColumnVector& a)
00058     : MDiagArray2<Complex> (ComplexColumnVector (a)) { }
00059 
00060   explicit ComplexDiagMatrix (const ComplexColumnVector& a)
00061     : MDiagArray2<Complex> (a) { }
00062 
00063   explicit ComplexDiagMatrix (const DiagMatrix& a);
00064 
00065   ComplexDiagMatrix (const MDiagArray2<Complex>& a)
00066     : MDiagArray2<Complex> (a) { }
00067 
00068   ComplexDiagMatrix (const ComplexDiagMatrix& a)
00069     : MDiagArray2<Complex> (a) { }
00070 
00071   ComplexDiagMatrix& operator = (const ComplexDiagMatrix& a)
00072     {
00073       MDiagArray2<Complex>::operator = (a);
00074       return *this;
00075     }
00076 
00077   bool operator == (const ComplexDiagMatrix& a) const;
00078   bool operator != (const ComplexDiagMatrix& a) const;
00079 
00080   ComplexDiagMatrix& fill (double val);
00081   ComplexDiagMatrix& fill (const Complex& val);
00082   ComplexDiagMatrix& fill (double val, int beg, int end);
00083   ComplexDiagMatrix& fill (const Complex& val, int beg, int end);
00084   ComplexDiagMatrix& fill (const ColumnVector& a);
00085   ComplexDiagMatrix& fill (const ComplexColumnVector& a);
00086   ComplexDiagMatrix& fill (const RowVector& a);
00087   ComplexDiagMatrix& fill (const ComplexRowVector& a);
00088   ComplexDiagMatrix& fill (const ColumnVector& a, int beg);
00089   ComplexDiagMatrix& fill (const ComplexColumnVector& a, int beg);
00090   ComplexDiagMatrix& fill (const RowVector& a, int beg);
00091   ComplexDiagMatrix& fill (const ComplexRowVector& a, int beg);
00092 
00093   ComplexDiagMatrix hermitian (void) const;  // complex conjugate transpose
00094   ComplexDiagMatrix transpose (void) const;
00095 
00096   friend ComplexDiagMatrix conj (const ComplexDiagMatrix& a);
00097 
00098   // resize is the destructive analog for this one
00099 
00100   ComplexMatrix extract (int r1, int c1, int r2, int c2) const;
00101 
00102   // extract row or column i
00103 
00104   ComplexRowVector row (int i) const;
00105   ComplexRowVector row (char *s) const;
00106 
00107   ComplexColumnVector column (int i) const;
00108   ComplexColumnVector column (char *s) const;
00109 
00110   ComplexDiagMatrix inverse (int& info) const;
00111   ComplexDiagMatrix inverse (void) const;
00112 
00113   // diagonal matrix by diagonal matrix -> diagonal matrix operations
00114 
00115   ComplexDiagMatrix& operator += (const DiagMatrix& a);
00116   ComplexDiagMatrix& operator -= (const DiagMatrix& a);
00117 
00118   // other operations
00119 
00120   ComplexColumnVector diag (void) const;
00121   ComplexColumnVector diag (int k) const;
00122 
00123   // i/o
00124 
00125   friend std::ostream& operator << (std::ostream& os, const ComplexDiagMatrix& a);
00126 
00127 private:
00128 
00129   ComplexDiagMatrix (Complex *d, int nr, int nc)
00130     : MDiagArray2<Complex> (d, nr, nc) { }
00131 };
00132 
00133 // diagonal matrix by diagonal matrix -> diagonal matrix operations
00134 
00135 ComplexDiagMatrix
00136 operator * (const ComplexDiagMatrix& a, const ComplexDiagMatrix& b);
00137 
00138 ComplexDiagMatrix
00139 operator * (const ComplexDiagMatrix& a, const DiagMatrix& b);
00140 
00141 ComplexDiagMatrix
00142 operator * (const DiagMatrix& a, const ComplexDiagMatrix& b);
00143 
00144 MDIAGARRAY2_FORWARD_DEFS (MDiagArray2, ComplexDiagMatrix, Complex)
00145 
00146 #endif
00147 
00148 /*
00149 ;;; Local Variables: ***
00150 ;;; mode: C++ ***
00151 ;;; End: ***
00152 */

Wed Dec 29 11:50:57 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送