diff liboctave/Range.h @ 4810:72a6d410a14a

[project @ 2004-03-03 18:49:39 by jwe]
author jwe
date Wed, 03 Mar 2004 18:49:39 +0000
parents 5719210fff4c
children 198f3712c692
line wrap: on
line diff
--- a/liboctave/Range.h	Tue Mar 02 17:40:08 2004 +0000
+++ b/liboctave/Range.h	Wed Mar 03 18:49:39 2004 +0000
@@ -28,8 +28,7 @@
 #endif
 
 #include <iostream>
-
-class Matrix;
+#include "dMatrix.h"
 
 class
 Range
@@ -65,9 +64,9 @@
 
   void sort (void);
 
-  void set_base (double b) { rng_base = b;  }
-  void set_limit (double l) { rng_limit = l; }
-  void set_inc (double i) { rng_inc = i;   }
+  void set_base (double b) { rng_base = b; cache.resize (0,0); }
+  void set_limit (double l) { rng_limit = l; cache.resize (0,0); }
+  void set_inc (double i) { rng_inc = i; cache.resize (0,0); }
 
   friend std::ostream& operator << (std::ostream& os, const Range& r);
   friend std::istream& operator >> (std::istream& is, Range& r);
@@ -76,6 +75,7 @@
 
  private:
 
+  mutable Matrix cache;
   double rng_base;
   double rng_limit;
   double rng_inc;