Mercurial > hg > octave-nkf
diff liboctave/MSparse.h @ 7602:7bfaa9611558
Rewrite sparse mappers in terms of a functor template function
author | David Bateman <dbateman@free.fr> |
---|---|
date | Wed, 19 Mar 2008 10:38:33 -0400 |
parents | a1dbe9d80eee |
children | 36594d5bbe13 |
line wrap: on
line diff
--- a/liboctave/MSparse.h +++ b/liboctave/MSparse.h @@ -112,6 +112,12 @@ { return Sparse<T>::ipermute (vec); } + template <class U, class F> + MSparse<U> map (F fcn) const + { + return Sparse<T>::template map<U> (fcn); + } + // Currently, the OPS functions don't need to be friends, but that // may change.