Go to the documentation of this file.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 "Array.h"
00028
00029 #include "mx-defs.h"
00030 #include "mx-op-decl.h"
00031
00032 class
00033 OCTAVE_API
00034 boolMatrix : public Array<bool>
00035 {
00036 public:
00037
00038 boolMatrix (void) : Array<bool> () { }
00039
00040 boolMatrix (octave_idx_type r, octave_idx_type c)
00041 : Array<bool> (dim_vector (r, c)) { }
00042
00043 boolMatrix (octave_idx_type r, octave_idx_type c, bool val)
00044 : Array<bool> (dim_vector (r, c), val) { }
00045
00046 boolMatrix (const dim_vector& dv) : Array<bool> (dv) { }
00047
00048 boolMatrix (const dim_vector& dv, bool val) : Array<bool> (dv, val) { }
00049
00050 boolMatrix (const Array<bool>& a) : Array<bool> (a.as_matrix ()) { }
00051
00052 boolMatrix (const boolMatrix& a) : Array<bool> (a) { }
00053
00054 boolMatrix& operator = (const boolMatrix& a)
00055 {
00056 Array<bool>::operator = (a);
00057 return *this;
00058 }
00059
00060 bool operator == (const boolMatrix& a) const;
00061 bool operator != (const boolMatrix& a) const;
00062
00063 boolMatrix transpose (void) const { return Array<bool>::transpose (); }
00064
00065
00066
00067 boolMatrix& insert (const boolMatrix& a, octave_idx_type r, octave_idx_type c);
00068
00069
00070
00071 boolMatrix operator ! (void) const;
00072
00073
00074
00075 boolMatrix diag (octave_idx_type k = 0) const;
00076
00077 boolMatrix all (int dim = -1) const;
00078 boolMatrix any (int dim = -1) const;
00079
00080 #if 0
00081
00082
00083 friend std::ostream& operator << (std::ostream& os, const Matrix& a);
00084 friend std::istream& operator >> (std::istream& is, Matrix& a);
00085 #endif
00086
00087 void resize (octave_idx_type nr, octave_idx_type nc,
00088 bool rfv = resize_fill_value ())
00089 {
00090 Array<bool>::resize (dim_vector (nr, nc), rfv);
00091 }
00092
00093 static bool resize_fill_value (void) { return false; }
00094
00095 };
00096
00097 MM_BOOL_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API)
00098 MS_BOOL_OP_DECLS (boolMatrix, bool, OCTAVE_API)
00099 SM_BOOL_OP_DECLS (bool, boolMatrix, OCTAVE_API)
00100 MM_CMP_OP_DECLS (boolMatrix, boolMatrix, OCTAVE_API)
00101
00102 #endif