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

chMatrix.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_chMatrix_int_h)
00024 #define octave_chMatrix_int_h 1
00025 
00026 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029 
00030 #include <string>
00031 
00032 #include "MArray2.h"
00033 
00034 #include "mx-defs.h"
00035 #include "str-vec.h"
00036 
00037 class
00038 charMatrix : public MArray2<char>
00039 {
00040 friend class ComplexMatrix;
00041 
00042 public:
00043 
00044   charMatrix (void) : MArray2<char> () { }
00045   charMatrix (int r, int c) : MArray2<char> (r, c) { }
00046   charMatrix (int r, int c, char val) : MArray2<char> (r, c, val) { }
00047   charMatrix (const MArray2<char>& a) : MArray2<char> (a) { }
00048   charMatrix (const charMatrix& a) : MArray2<char> (a) { }
00049   charMatrix (char c);
00050   charMatrix (const char *s);
00051   charMatrix (const std::string& s);
00052   charMatrix (const string_vector& s);
00053 
00054   charMatrix& operator = (const charMatrix& a)
00055     {
00056       MArray2<char>::operator = (a);
00057       return *this;
00058     }
00059 
00060   bool operator == (const charMatrix& a) const;
00061   bool operator != (const charMatrix& a) const;
00062 
00063   charMatrix transpose (void) const { return MArray2<char>::transpose (); }
00064 
00065   // destructive insert/delete/reorder operations
00066 
00067   charMatrix& insert (const char *s, int r, int c);
00068   charMatrix& insert (const charMatrix& a, int r, int c);
00069 
00070   std::string row_as_string (int, bool strip_ws = false, bool raw = false) const;
00071 
00072   // resize is the destructive equivalent for this one
00073 
00074   charMatrix extract (int r1, int c1, int r2, int c2) const;
00075 
00076   boolMatrix all (int dim = -1) const;
00077   boolMatrix any (int dim = -1) const;
00078 
00079 #if 0
00080   // i/o
00081 
00082   friend std::ostream& operator << (std::ostream& os, const Matrix& a);
00083   friend std::istream& operator >> (std::istream& is, Matrix& a);
00084 #endif
00085 
00086   static char resize_fill_value (void) { return '\0'; }
00087 
00088 private:
00089 
00090   charMatrix (char *ch, int r, int c) : MArray2<char> (ch, r, c) { }
00091 };
00092 
00093 #endif
00094 
00095 /*
00096 ;;; Local Variables: ***
00097 ;;; mode: C++ ***
00098 ;;; End: ***
00099 */

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