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

dRowVector.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_RowVector_h)
00024 #define octave_RowVector_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 RowVector : public MArray<double>
00036 {
00037 public:
00038 
00039   RowVector (void) : MArray<double> () { }
00040 
00041   explicit RowVector (int n) : MArray<double> (n) { }
00042 
00043   RowVector (int n, double val) : MArray<double> (n, val) { }
00044 
00045   RowVector (const RowVector& a) : MArray<double> (a) { }
00046 
00047   RowVector (const MArray<double>& a) : MArray<double> (a) { }
00048 
00049   RowVector& operator = (const RowVector& a)
00050     {
00051       MArray<double>::operator = (a);
00052       return *this;
00053     }
00054 
00055   bool operator == (const RowVector& a) const;
00056   bool operator != (const RowVector& a) const;
00057 
00058   // destructive insert/delete/reorder operations
00059 
00060   RowVector& insert (const RowVector& a, int c);
00061 
00062   RowVector& fill (double val);
00063   RowVector& fill (double val, int c1, int c2);
00064 
00065   RowVector append (const RowVector& a) const;
00066 
00067   ColumnVector transpose (void) const;
00068 
00069   friend RowVector real (const ComplexRowVector& a);
00070   friend RowVector imag (const ComplexRowVector& a);
00071 
00072   // resize is the destructive equivalent for this one
00073 
00074   RowVector extract (int c1, int c2) const;
00075 
00076   RowVector extract_n (int c1, int n) const;
00077 
00078   // row vector by matrix -> row vector
00079 
00080   friend RowVector operator * (const RowVector& a, const Matrix& b);
00081 
00082   // other operations
00083 
00084   RowVector map (d_d_Mapper f) const;
00085 
00086   RowVector& apply (d_d_Mapper f);
00087 
00088   double min (void) const;
00089   double max (void) const;
00090 
00091   // i/o
00092 
00093   friend std::ostream& operator << (std::ostream& os, const RowVector& a);
00094   friend std::istream& operator >> (std::istream& is, RowVector& a);
00095 
00096 private:
00097 
00098   RowVector (double *d, int l) : MArray<double> (d, l) { }
00099 };
00100 
00101 // row vector by column vector -> scalar
00102 
00103 double operator * (const RowVector& a, const ColumnVector& b);
00104 
00105 Complex operator * (const RowVector& a, const ComplexColumnVector& b);
00106 
00107 // other operations
00108 
00109 RowVector linspace (double x1, double x2, int n);
00110 
00111 MARRAY_FORWARD_DEFS (MArray, RowVector, double)
00112 
00113 #endif
00114 
00115 /*
00116 ;;; Local Variables: ***
00117 ;;; mode: C++ ***
00118 ;;; End: ***
00119 */

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