diff src/ov-re-mat.h @ 9350:16a5f9e1fdb3

cache idx_vector result in matrices once used for indexing
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 15 Jun 2009 10:40:10 +0200
parents d865363208d6
children e2344f4af0cb
line wrap: on
line diff
--- a/src/ov-re-mat.h	Sun Jun 14 20:33:47 2009 -0400
+++ b/src/ov-re-mat.h	Mon Jun 15 10:40:10 2009 +0200
@@ -90,7 +90,8 @@
 
   octave_base_value *try_narrowing_conversion (void);
 
-  idx_vector index_vector (void) const { return idx_vector (matrix); }
+  idx_vector index_vector (void) const
+    { return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix)); }
 
   bool is_real_matrix (void) const { return true; }