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 #if !defined (octave_charNDArray_h)
00024 #define octave_charNDArray_h 1
00025
00026 #include "Array.h"
00027 #include "chMatrix.h"
00028
00029 #include "mx-defs.h"
00030 #include "mx-op-decl.h"
00031 #include "bsxfun-decl.h"
00032
00033 class
00034 OCTAVE_API
00035 charNDArray : public Array<char>
00036 {
00037 public:
00038
00039 typedef charMatrix matrix_type;
00040
00041 charNDArray (void) : Array<char> () { }
00042
00043 charNDArray (const dim_vector& dv) : Array<char> (dv) { }
00044
00045 charNDArray (const dim_vector& dv, char val) : Array<char> (dv, val) { }
00046
00047 charNDArray (const charNDArray& a) : Array<char> (a) { }
00048
00049 charNDArray (const charMatrix& a) : Array<char> (a) { }
00050
00051 charNDArray (char c) : Array<char> (charMatrix (c)) { }
00052
00053 charNDArray (const char *s) : Array<char> (charMatrix (s)) { }
00054
00055 charNDArray (const std::string& s) : Array<char> (charMatrix (s)) { }
00056
00057 charNDArray (const string_vector& s) : Array<char> (charMatrix (s)) { }
00058
00059 charNDArray (const Array<char>& a) : Array<char> (a) { }
00060
00061 charNDArray& operator = (const charNDArray& a)
00062 {
00063 Array<char>::operator = (a);
00064 return *this;
00065 }
00066
00067 bool any_element_is_nan (void) const { return false; }
00068
00069
00070
00071 boolNDArray all (int dim = -1) const;
00072 boolNDArray any (int dim = -1) const;
00073 charNDArray concat (const charNDArray& rb, const Array<octave_idx_type>& ra_idx);
00074 charNDArray concat (const NDArray& rb, const Array<octave_idx_type>& ra_idx);
00075
00076 charNDArray& insert (const charNDArray& a, octave_idx_type r, octave_idx_type c);
00077 charNDArray& insert (const charNDArray& a, const Array<octave_idx_type>& ra_idx);
00078
00079 charMatrix matrix_value (void) const;
00080
00081 charNDArray squeeze (void) const { return Array<char>::squeeze (); }
00082
00083 static void increment_index (Array<octave_idx_type>& ra_idx,
00084 const dim_vector& dimensions,
00085 int start_dimension = 0);
00086
00087 static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx,
00088 const dim_vector& dimensions);
00089
00090
00091
00092
00093
00094
00095 static char resize_fill_value (void) { return '\0'; }
00096
00097 charNDArray diag (octave_idx_type k = 0) const;
00098
00099 };
00100
00101 NDS_CMP_OP_DECLS (charNDArray, char, OCTAVE_API)
00102 NDS_BOOL_OP_DECLS (charNDArray, char, OCTAVE_API)
00103
00104 SND_CMP_OP_DECLS (char, charNDArray, OCTAVE_API)
00105 SND_BOOL_OP_DECLS (char, charNDArray, OCTAVE_API)
00106
00107 NDND_CMP_OP_DECLS (charNDArray, charNDArray, OCTAVE_API)
00108 NDND_BOOL_OP_DECLS (charNDArray, charNDArray, OCTAVE_API)
00109
00110 BSXFUN_STDREL_DECLS (charNDArray, OCTAVE_API)
00111
00112 #endif