diff liboctave/idx-vector.h @ 10339:de2d43bcb083

optimize some lazy index operations
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 19 Feb 2010 11:47:47 +0100
parents cbc402e64d83
children 0677c5d80b77
line wrap: on
line diff
--- a/liboctave/idx-vector.h	Fri Feb 19 10:44:27 2010 +0100
+++ b/liboctave/idx-vector.h	Fri Feb 19 11:47:47 2010 +0100
@@ -103,6 +103,8 @@
     // i/o
     virtual std::ostream& print (std::ostream& os) const = 0;
 
+    virtual Array<octave_idx_type> as_array (void);
+
     int count;
 
     bool err;
@@ -203,6 +205,8 @@
 
     Range unconvert (void) const;
 
+    Array<octave_idx_type> as_array (void);
+
   private:
 
     DECLARE_OCTAVE_ALLOCATOR
@@ -260,6 +264,8 @@
 
     double unconvert (void) const;
 
+    Array<octave_idx_type> as_array (void);
+
   private:
 
     DECLARE_OCTAVE_ALLOCATOR
@@ -327,6 +333,8 @@
 
     Array<double> unconvert (void) const;
 
+    Array<octave_idx_type> as_array (void);
+    
   private:
 
     DECLARE_OCTAVE_ALLOCATOR
@@ -970,6 +978,8 @@
   void unconvert (idx_class_type& iclass,
                   double& scalar, Range& range, 
                   Array<double>& array, Array<bool>& mask) const;
+
+  Array<octave_idx_type> as_array (void) const;
     
   // FIXME -- these are here for compatibility.  They should be removed
   // when no longer in use.