comparison liboctave/array/DiagArray2.cc @ 15430:21467c7fc08f

Deprecate DiagArray2<T>::diag * DiagArray2.cc (DiagArray2<T>::[diag, extract_diag]): Exchange these two functions. * DiagArray2.h (DiagArray2<T>::diag): Add GCC_ATTR_DEPRECATED
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Fri, 21 Sep 2012 17:31:25 -0400
parents 4db96357fec9
children d63878346099
comparison
equal deleted inserted replaced
15429:4db96357fec9 15430:21467c7fc08f
46 Array<T>::resize (dim_vector (rcmin, 1)); 46 Array<T>::resize (dim_vector (rcmin, 1));
47 } 47 }
48 48
49 template <class T> 49 template <class T>
50 Array<T> 50 Array<T>
51 DiagArray2<T>::extract_diag (octave_idx_type k) const 51 DiagArray2<T>::diag (octave_idx_type k) const
52 { 52 {
53 return diag (k); 53 return extract_diag (k);
54 } 54 }
55 55
56 template <class T> 56 template <class T>
57 Array<T> 57 Array<T>
58 DiagArray2<T>::diag (octave_idx_type k) const 58 DiagArray2<T>::extract_diag (octave_idx_type k) const
59 { 59 {
60 Array<T> d; 60 Array<T> d;
61 61
62 if (k == 0) 62 if (k == 0)
63 // The main diagonal is shallow-copied. 63 // The main diagonal is shallow-copied.