diff liboctave/idx-vector.h @ 10512:aac9f4265048

rewrite sparse indexed assignment
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 13 Apr 2010 12:36:21 +0200
parents d47802f0e557
children f0266ee4aabe
line wrap: on
line diff
--- a/liboctave/idx-vector.h	Mon Apr 12 18:07:58 2010 -0400
+++ b/liboctave/idx-vector.h	Tue Apr 13 12:36:21 2010 +0200
@@ -985,6 +985,10 @@
 
   bool is_permutation (octave_idx_type n) const;
 
+  // Returns the inverse permutation. If this is not a permutation on 1:n, the
+  // result is undefined (but no error unless extent () != n).
+  idx_vector inverse_permutation (octave_idx_type n) const;
+
   // Copies all the indices to a given array. Not allowed for colons.
   void copy_data (octave_idx_type *data) const;