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

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

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