comparison src/ov-bool-sparse.h @ 7503:8c32f95c2639

convert mapper functions to new format
author David Bateman <dbateman@free.fr>
date Wed, 20 Feb 2008 04:22:50 -0500
parents a1dbe9d80eee
children 99c410f7f0b0
comparison
equal deleted inserted replaced
7502:2ce6b4258e96 7503:8c32f95c2639
110 110
111 ComplexMatrix complex_matrix_value (bool = false) const; 111 ComplexMatrix complex_matrix_value (bool = false) const;
112 112
113 ComplexNDArray complex_array_value (bool = false) const; 113 ComplexNDArray complex_array_value (bool = false) const;
114 114
115 charNDArray char_array_value (bool = false) const;
116
115 boolMatrix bool_matrix_value (bool = false) const; 117 boolMatrix bool_matrix_value (bool = false) const;
116 118
117 boolNDArray bool_array_value (bool = false) const; 119 boolNDArray bool_array_value (bool = false) const;
118 120
119 SparseMatrix sparse_matrix_value (bool = false) const; 121 SparseMatrix sparse_matrix_value (bool = false) const;
135 137
136 bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug); 138 bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug);
137 #endif 139 #endif
138 140
139 mxArray *as_mxArray (void) const; 141 mxArray *as_mxArray (void) const;
142
143 // Mapper functions are converted to double for treatment
144 #define BOOL_SPARSE_MAPPER(MAP) \
145 octave_value MAP (void) const \
146 { \
147 octave_sparse_matrix m (sparse_matrix_value ()); \
148 return m.MAP (); \
149 }
150
151 BOOL_SPARSE_MAPPER (abs)
152 BOOL_SPARSE_MAPPER (acos)
153 BOOL_SPARSE_MAPPER (acosh)
154 BOOL_SPARSE_MAPPER (angle)
155 BOOL_SPARSE_MAPPER (arg)
156 BOOL_SPARSE_MAPPER (asin)
157 BOOL_SPARSE_MAPPER (asinh)
158 BOOL_SPARSE_MAPPER (atan)
159 BOOL_SPARSE_MAPPER (atanh)
160 BOOL_SPARSE_MAPPER (ceil)
161 BOOL_SPARSE_MAPPER (conj)
162 BOOL_SPARSE_MAPPER (cos)
163 BOOL_SPARSE_MAPPER (cosh)
164 BOOL_SPARSE_MAPPER (erf)
165 BOOL_SPARSE_MAPPER (erfc)
166 BOOL_SPARSE_MAPPER (exp)
167 BOOL_SPARSE_MAPPER (finite)
168 BOOL_SPARSE_MAPPER (fix)
169 BOOL_SPARSE_MAPPER (floor)
170 BOOL_SPARSE_MAPPER (gamma)
171 BOOL_SPARSE_MAPPER (imag)
172 BOOL_SPARSE_MAPPER (isinf)
173 BOOL_SPARSE_MAPPER (isna)
174 BOOL_SPARSE_MAPPER (isnan)
175 BOOL_SPARSE_MAPPER (lgamma)
176 BOOL_SPARSE_MAPPER (log)
177 BOOL_SPARSE_MAPPER (log10)
178 BOOL_SPARSE_MAPPER (real)
179 BOOL_SPARSE_MAPPER (round)
180 BOOL_SPARSE_MAPPER (signum)
181 BOOL_SPARSE_MAPPER (sin)
182 BOOL_SPARSE_MAPPER (sinh)
183 BOOL_SPARSE_MAPPER (sqrt)
184 BOOL_SPARSE_MAPPER (tan)
185 BOOL_SPARSE_MAPPER (tanh)
186
187 #undef BOOL_SPARSE_MAPPER
140 188
141 protected: 189 protected:
142 190
143 DECLARE_OCTAVE_ALLOCATOR 191 DECLARE_OCTAVE_ALLOCATOR
144 192