comparison src/ov-base-sparse.cc @ 8150:283989f2da9b

make null assignment matlab compatible
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 26 Sep 2008 11:52:01 -0400
parents 91d7440211e7
children 22462fd58e66
comparison
equal deleted inserted replaced
8149:a8fb37ae61b8 8150:283989f2da9b
194 194
195 // Invalidate matrix type. 195 // Invalidate matrix type.
196 typ.invalidate_type (); 196 typ.invalidate_type ();
197 } 197 }
198 198
199 template <class MT>
200 void
201 octave_base_sparse<MT>::delete_elements (const octave_value_list& idx)
202 {
203 octave_idx_type len = idx.length ();
204
205 Array<idx_vector> ra_idx (len);
206
207 for (octave_idx_type i = 0; i < len; i++)
208 ra_idx(i) = idx(i).index_vector ();
209
210 matrix.maybe_delete_elements (ra_idx);
211
212 // Invalidate the matrix type
213 typ.invalidate_type ();
214 }
215
199 template <class T> 216 template <class T>
200 octave_value 217 octave_value
201 octave_base_sparse<T>::resize (const dim_vector& dv, bool) const 218 octave_base_sparse<T>::resize (const dim_vector& dv, bool) const
202 { 219 {
203 T retval (matrix); 220 T retval (matrix);