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 (
"use 'numel' instead")
89 bool all_elements_are_ints (
void)
const;
91 Matrix matrix_value (
void)
const;
93 double min (
void)
const;
94 double max (
void)
const;
96 void sort_internal (
bool ascending =
true);
116 void set_base (
double b);
118 void set_limit (
double l);
120 void set_inc (
double i);
122 friend OCTAVE_API std::ostream&
operator << (std::ostream& os,
146 double limit_internal (
void)
const;
156 : rng_base (b), rng_limit (l), rng_inc (i),
157 rng_numel (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)
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 numel(void) const
bool is_empty(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)
=val(i)}if ode{val(i)}occurs in table i
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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x
void clear_cache(void) const
charNDArray min(char d, const charNDArray &m)