comparison 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
comparison
equal deleted inserted replaced
4809:b60be7678bdc 4810:72a6d410a14a
26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) 26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
27 #pragma interface 27 #pragma interface
28 #endif 28 #endif
29 29
30 #include <iostream> 30 #include <iostream>
31 31 #include "dMatrix.h"
32 class Matrix;
33 32
34 class 33 class
35 Range 34 Range
36 { 35 {
37 public: 36 public:
63 double min (void) const; 62 double min (void) const;
64 double max (void) const; 63 double max (void) const;
65 64
66 void sort (void); 65 void sort (void);
67 66
68 void set_base (double b) { rng_base = b; } 67 void set_base (double b) { rng_base = b; cache.resize (0,0); }
69 void set_limit (double l) { rng_limit = l; } 68 void set_limit (double l) { rng_limit = l; cache.resize (0,0); }
70 void set_inc (double i) { rng_inc = i; } 69 void set_inc (double i) { rng_inc = i; cache.resize (0,0); }
71 70
72 friend std::ostream& operator << (std::ostream& os, const Range& r); 71 friend std::ostream& operator << (std::ostream& os, const Range& r);
73 friend std::istream& operator >> (std::istream& is, Range& r); 72 friend std::istream& operator >> (std::istream& is, Range& r);
74 73
75 void print_range (void); 74 void print_range (void);
76 75
77 private: 76 private:
78 77
78 mutable Matrix cache;
79 double rng_base; 79 double rng_base;
80 double rng_limit; 80 double rng_limit;
81 double rng_inc; 81 double rng_inc;
82 82
83 int rng_nelem; 83 int rng_nelem;