23 #if !defined (octave_Range_h)
24 #define octave_Range_h 1
38 : rng_base (0), rng_limit (0), rng_inc (0), rng_nelem (0),
cache (1, 0) { }
41 : rng_base (r.rng_base), rng_limit (r.rng_limit), rng_inc (r.rng_inc),
45 : rng_base (b), rng_limit (l), rng_inc (1),
46 rng_nelem (nelem_internal ()),
cache () { }
48 Range (
double b,
double l,
double i)
49 : rng_base (b), rng_limit (l), rng_inc (i),
50 rng_nelem (nelem_internal ()),
cache () { }
54 : rng_base (b), rng_limit (b + (n-1) * i), rng_inc (i),
55 rng_nelem (n),
cache ()
61 double base (
void)
const {
return rng_base; }
62 double limit (
void)
const {
return rng_limit; }
63 double inc (
void)
const {
return rng_inc; }
66 bool all_elements_are_ints (
void)
const;
68 Matrix matrix_value (
void)
const;
70 double min (
void)
const;
71 double max (
void)
const;
73 void sort_internal (
bool ascending =
true);
120 friend OCTAVE_API std::ostream&
operator << (std::ostream& os,
132 void print_range (
void);
152 : rng_base (b), rng_limit (l), rng_inc (i),
153 rng_nelem (n), cache ()
OCTAVE_API Range operator-(const Range &r)
void resize(octave_idx_type nr, octave_idx_type nc, double rfv=0)
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
octave_idx_type nelem(void) const
static void cache(const std::string key, str_llist_type *value)
Range(double b, double i, octave_idx_type n)
Range(double b, double l, double i)
charNDArray max(char d, const charNDArray &m)
Range(double b, double l)
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
OCTAVE_API Range operator*(double x, const Range &r)
octave_idx_type rng_nelem
OCTAVE_API Range operator+(double x, const Range &r)
Range(double b, double l, double i, octave_idx_type n)
F77_RET_T const double * x
void clear_cache(void) const
charNDArray min(char d, const charNDArray &m)