Mercurial > hg > octave-nkf
diff liboctave/MArray2.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 | 36594d5bbe13 |
line wrap: on
line diff
--- a/liboctave/MArray2.h +++ b/liboctave/MArray2.h @@ -59,6 +59,12 @@ MArray2 (const Array2<T>& a) : Array2<T> (a) { } + template <class U> + MArray2 (const Array2<U>& a) : Array2<T> (a) { } + + template <class U> + MArray2 (const MArray2<U>& a) : Array2<T> (a) { } + ~MArray2 (void) { } MArray2<T>& operator = (const MArray2<T>& a) @@ -75,6 +81,12 @@ MArray2<T> transpose (void) const { return Array2<T>::transpose (); } + template <class U, class F> + MArray2<U> map (F fcn) const + { + return Array2<T>::template map<U> (fcn); + } + // Currently, the OPS functions don't need to be friends, but that // may change.