00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined (octave_boolMatrix_int_h)
00025 #define octave_boolMatrix_int_h 1
00026
00027 #include "Array2.h"
00028
00029 #include "mx-defs.h"
00030 #include "mx-op-decl.h"
00031
00032 class
00033 OCTAVE_API
00034 boolMatrix : public Array2<bool>
00035 {
00036 public:
00037
00038 boolMatrix (void) : Array2<bool> () { }
00039 boolMatrix (octave_idx_type r, octave_idx_type c) : Array2<bool> (r, c) { }
00040 boolMatrix (octave_idx_type r, octave_idx_type c, bool val) : Array2<bool> (r, c, val) { }
00041 boolMatrix (const dim_vector& dv) : Array2<bool> (dv) { }
00042 boolMatrix (const dim_vector& dv, bool val) : Array2<bool> (dv, val) { }
00043 boolMatrix (const Array2<bool>& a) : Array2<bool> (a) { }
00044 boolMatrix (const boolMatrix& a) : Array2<bool> (a) { }
00045
00046 boolMatrix& operator = (const boolMatrix& a)
00047 {
00048 Array2<bool>::operator = (a);
00049 return *this;
00050 }
00051
00052 bool operator == (const boolMatrix& a) const;
00053 bool operator != (const boolMatrix& a) const;
00054
00055 boolMatrix transpose (void) const { return Array2<bool>::transpose (); }
00056
00057
00058
00059 boolMatrix& insert (const boolMatrix& a, octave_idx_type r, octave_idx_type c);
00060
00061
00062
00063 boolMatrix operator ! (void) const;
00064
00065
00066
00067 boolMatrix diag (octave_idx_type k = 0) const;
00068
00069 boolMatrix all (int dim = -1) const;
00070 boolMatrix any (int dim = -1) const;
00071
00072 #if 0
00073
00074
00075 friend std::ostream& operator << (std::ostream& os, const Matrix& a);
00076 friend std::istream& operator >> (std::istream& is, Matrix& a);
00077 #endif
00078
00079 static bool resize_fill_value (void) { return false; }
00080
00081 private:
00082
00083 boolMatrix (bool *b, octave_idx_type r, octave_idx_type c) : Array2<bool> (b, r, c) { }
00084 };
00085
00086 MM_BOOL_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API)
00087 MS_BOOL_OP_DECLS (boolMatrix, bool, OCTAVE_API)
00088 SM_BOOL_OP_DECLS (bool, boolMatrix, OCTAVE_API)
00089 MM_CMP_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API)
00090
00091 #endif
00092
00093
00094
00095
00096
00097