23 #if ! defined (octave_Range_h) 24 #define octave_Range_h 1 26 #include "octave-config.h" 40 : rng_base (0), rng_limit (0), rng_inc (0), rng_numel (0), cache (1, 0) { }
43 : rng_base (r.rng_base), rng_limit (r.rng_limit), rng_inc (r.rng_inc),
44 rng_numel (r.rng_numel), cache (r.cache) { }
47 : rng_base (
b), rng_limit (l), rng_inc (1),
48 rng_numel (numel_internal ()), cache ()
50 rng_limit = limit_internal ();
54 : rng_base (
b), rng_limit (l), rng_inc (
i),
55 rng_numel (numel_internal ()), cache ()
57 rng_limit = limit_internal ();
62 : rng_base (
b), rng_limit (
b + (n-1) *
i), rng_inc (
i),
63 rng_numel (n), cache ()
74 rng_limit = limit_internal ();
78 double base (
void)
const {
return rng_base; }
79 double limit (
void)
const {
return rng_limit; }
80 double inc (
void)
const {
return rng_inc; }
82 OCTAVE_DEPRECATED (4.4,
"use 'numel' instead")
94 OCTAVE_DEPRECATED (4.4,
"use 'isempty' instead")
96 {
return isempty (); }
98 bool all_elements_are_ints (
void)
const;
100 Matrix matrix_value (
void)
const;
102 double min (
void)
const;
103 double max (
void)
const;
105 void sort_internal (
bool ascending =
true);
117 OCTAVE_DEPRECATED (4.4,
"use 'issorted' instead")
119 {
return issorted (
mode); }
134 {
return elem (
i, j); }
138 void set_base (
double b);
140 void set_limit (
double l);
142 void set_inc (
double i);
144 friend OCTAVE_API std::ostream&
operator << (std::ostream&
os,
168 double limit_internal (
void)
const;
178 : rng_base (
b), rng_limit (l), rng_inc (
i),
179 rng_numel (n), cache ()
OCTAVE_API Range operator-(const Range &r)
octave_idx_type columns(void) const
void resize(octave_idx_type nr, octave_idx_type nc, double rfv=0)
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
octave_idx_type cols(void) const
void clear_cache(void) const
double elem(octave_idx_type, octave_idx_type j) const
octave_idx_type rows(void) const
octave_idx_type numel(void) const
octave_idx_type rng_numel
Range(double b, double i, octave_idx_type n)
Range(double b, double l, double i)
charNDArray max(char d, const charNDArray &m)
T::size_type numel(const T &str)
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_API Range operator+(double x, const Range &r)
Range(double b, double l, double i, octave_idx_type n)
write the output to stdout if nargout is
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x
charNDArray min(char d, const charNDArray &m)