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

CRowVector.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_ComplexRowVector_h)
00024 #define octave_ComplexRowVector_h 1
00025 
00026 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029 
00030 #include "MArray.h"
00031 
00032 #include "mx-defs.h"
00033 
00034 class
00035 ComplexRowVector : public MArray<Complex>
00036 {
00037 friend class ComplexColumnVector;
00038 
00039 public:
00040 
00041   ComplexRowVector (void) : MArray<Complex> () { }
00042 
00043   explicit ComplexRowVector (int n) : MArray<Complex> (n) { }
00044 
00045   ComplexRowVector (int n, const Complex& val) : MArray<Complex> (n, val) { }
00046 
00047   ComplexRowVector (const ComplexRowVector& a) : MArray<Complex> (a) { }
00048 
00049   ComplexRowVector (const MArray<Complex>& a) : MArray<Complex> (a) { }
00050 
00051   explicit ComplexRowVector (const RowVector& a);
00052 
00053   ComplexRowVector& operator = (const ComplexRowVector& a)
00054     {
00055       MArray<Complex>::operator = (a);
00056       return *this;
00057     }
00058 
00059   bool operator == (const ComplexRowVector& a) const;
00060   bool operator != (const ComplexRowVector& a) const;
00061 
00062   // destructive insert/delete/reorder operations
00063 
00064   ComplexRowVector& insert (const RowVector& a, int c);
00065   ComplexRowVector& insert (const ComplexRowVector& a, int c);
00066 
00067   ComplexRowVector& fill (double val);
00068   ComplexRowVector& fill (const Complex& val);
00069   ComplexRowVector& fill (double val, int c1, int c2);
00070   ComplexRowVector& fill (const Complex& val, int c1, int c2);
00071 
00072   ComplexRowVector append (const RowVector& a) const;
00073   ComplexRowVector append (const ComplexRowVector& a) const;
00074 
00075   ComplexColumnVector hermitian (void) const;  // complex conjugate transpose.
00076   ComplexColumnVector transpose (void) const;
00077 
00078   friend ComplexRowVector conj (const ComplexRowVector& a);
00079 
00080   // resize is the destructive equivalent for this one
00081 
00082   ComplexRowVector extract (int c1, int c2) const;
00083 
00084   ComplexRowVector extract_n (int c1, int n) const;
00085 
00086   // row vector by row vector -> row vector operations
00087 
00088   ComplexRowVector& operator += (const RowVector& a);
00089   ComplexRowVector& operator -= (const RowVector& a);
00090 
00091   // row vector by matrix -> row vector
00092 
00093   friend ComplexRowVector operator * (const ComplexRowVector& a,
00094                                       const ComplexMatrix& b);
00095 
00096   friend ComplexRowVector operator * (const RowVector& a,
00097                                       const ComplexMatrix& b);
00098 
00099   // other operations
00100 
00101   ComplexRowVector map (c_c_Mapper f) const;
00102   RowVector map (d_c_Mapper f) const;
00103 
00104   ComplexRowVector& apply (c_c_Mapper f);
00105 
00106   Complex min (void) const;
00107   Complex max (void) const;
00108 
00109   // i/o
00110 
00111   friend std::ostream& operator << (std::ostream& os, const ComplexRowVector& a);
00112   friend std::istream& operator >> (std::istream& is, ComplexRowVector& a);
00113 
00114 private:
00115 
00116   ComplexRowVector (Complex *d, int l) : MArray<Complex> (d, l) { }
00117 };
00118 
00119 // row vector by column vector -> scalar
00120 
00121 Complex operator * (const ComplexRowVector& a, const ColumnVector& b);
00122 
00123 Complex operator * (const ComplexRowVector& a, const ComplexColumnVector& b);
00124 
00125 // other operations
00126 
00127 ComplexRowVector linspace (const Complex& x1, const Complex& x2, int n);
00128 
00129 MARRAY_FORWARD_DEFS (MArray, ComplexRowVector, Complex)
00130 
00131 #endif
00132 
00133 /*
00134 ;;; Local Variables: ***
00135 ;;; mode: C++ ***
00136 ;;; End: ***
00137 */

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