23 #if defined (HAVE_CONFIG_H) 178 if (
i.extent (n) != n)
253 || (! ascending && rng_base < rng_limit && rng_inc > 0.0))
270 bool reverse =
false;
273 || (! ascending && rng_base < rng_limit && rng_inc > 0.0))
303 retval.sort_internal (
true);
305 retval.sort_internal (
false);
308 (*current_liboctave_error_handler) (
"Range::sort: invalid dimension");
322 retval.sort_internal (sidx,
true);
324 retval.sort_internal (sidx,
false);
327 (*current_liboctave_error_handler) (
"Range::sort: invalid dimension");
381 double b =
a.base ();
382 double increment =
a.inc ();
390 os <<
b +
i * increment <<
' ';
394 os <<
a.rng_limit <<
"\n";
405 double tmp_rng_limit;
412 a.set_limit (tmp_rng_limit);
526 double rmax = q / (2.0 - ct);
529 t1 = (ct / q) * (t1 < 0.0 ? -t1 : t1);
530 t1 = (rmax < t1 ? rmax : t1);
531 t1 = (ct > t1 ? ct : t1);
534 if (
x <= 0.0 || (t1 -
x) < rmax)
542 double ct = 3.0 * std::numeric_limits<double>::epsilon ())
544 double tu = fabs (
u);
545 double tv = fabs (v);
547 return fabs (
u - v) < ((tu > tv ? tu : tv) * ct);
557 || (rng_limit < rng_base && rng_inc > 0))
563 double ct = 3.0 * std::numeric_limits<double>::epsilon ();
static bool teq(double u, double v, double ct=3.0 *std::numeric_limits< double >::epsilon())
Range sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
sortmode issorted(sortmode mode=ASCENDING) const
std::ostream & operator<<(std::ostream &os, const Range &a)
Matrix diag(octave_idx_type k=0) const
void resize(octave_idx_type nr, octave_idx_type nc, double rfv=0)
Range operator-(const Range &r)
bool all_elements_are_ints(void) const
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
const T * fortran_vec(void) const
Range operator+(double x, const Range &r)
void err_index_out_of_range(int nd, int dim, octave_idx_type idx, octave_idx_type ext)
std::complex< T > floor(const std::complex< T > &x)
void clear_cache(void) const
void operator()(octave_idx_type i)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Array< double > index(const idx_vector &i) const
double limit_internal(void) const
Matrix diag(octave_idx_type k=0) const
MArray< T > reshape(const dim_vector &new_dims) const
void sort_internal(bool ascending=true)
Range operator*(double x, const Range &r)
octave_idx_type nnz(void) const
Matrix matrix_value(void) const
octave_idx_type numel(void) const
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
octave_idx_type numel_internal(void) const
std::istream & operator>>(std::istream &is, Range &a)
double elem(octave_idx_type i) const
octave_idx_type rng_numel
With real return the complex result
charNDArray max(char d, const charNDArray &m)
octave_idx_type nint_big(double x)
double checkelem(octave_idx_type i) const
static double tfloor(double x, double ct)
bool isvector(void) const
write the output to stdout if nargout is
Vector representing the dimensions (size) of an Array.
__rangeidx_helper(double *a, double b, double i, double l, octave_idx_type n)
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