#include "Range.h"
Public Member Functions | |
Range (const Range &r)=default | |
Range (double b, double i, octave_idx_type n) | |
Range (double b, double l) | |
Range (double b, double l, double i) | |
Range (void) | |
~Range (void)=default | |
bool | all_elements_are_ints (void) const |
double | base (void) const |
double | checkelem (octave_idx_type i) const |
double | checkelem (octave_idx_type i, octave_idx_type j) const |
octave_idx_type | cols (void) const |
octave_idx_type | columns (void) const |
Matrix | diag (octave_idx_type k=0) const |
dim_vector | dims (void) const |
double | elem (octave_idx_type i) const |
double | elem (octave_idx_type, octave_idx_type j) const |
double | inc (void) const |
Array< double > | index (const idx_vector &i) const |
bool | isempty (void) const |
sortmode | issorted (sortmode mode=ASCENDING) const |
double | limit (void) const |
Matrix | matrix_value (void) const |
double | max (void) const |
double | min (void) const |
octave_idx_type | nnz (void) const |
octave_idx_type | numel (void) const |
double | operator() (octave_idx_type i) const |
double | operator() (octave_idx_type i, octave_idx_type j) const |
Range & | operator= (const Range &r)=default |
octave_idx_type | rows (void) const |
void | set_base (double b) |
void | set_inc (double i) |
void | set_limit (double l) |
Range | sort (Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const |
Range | sort (octave_idx_type dim=0, sortmode mode=ASCENDING) const |
void | sort_internal (Array< octave_idx_type > &sidx, bool ascending=true) |
void | sort_internal (bool ascending=true) |
Protected Member Functions | |
Range (double b, double l, double i, octave_idx_type n) | |
Private Member Functions | |
void | clear_cache (void) const |
void | init (void) |
double | limit_internal (void) const |
octave_idx_type | numel_internal (void) const |
Private Attributes | |
Matrix | cache |
double | rng_base |
double | rng_inc |
double | rng_limit |
octave_idx_type | rng_numel |
Friends | |
OCTAVE_API Range | operator* (const Range &r, double x) |
OCTAVE_API Range | operator* (double x, const Range &r) |
OCTAVE_API Range | operator+ (const Range &r, double x) |
OCTAVE_API Range | operator+ (double x, const Range &r) |
OCTAVE_API Range | operator- (const Range &r) |
OCTAVE_API Range | operator- (const Range &r, double x) |
OCTAVE_API Range | operator- (double x, const Range &r) |
OCTAVE_API std::ostream & | operator<< (std::ostream &os, const Range &r) |
OCTAVE_API std::istream & | operator>> (std::istream &is, Range &r) |
|
default |
|
default |
|
inline |
Definition at line 67 of file Range.h.
References octave::math::isfinite().
|
inlineprotected |
Definition at line 172 of file Range.h.
References octave::math::isfinite().
bool Range::all_elements_are_ints | ( | void | ) | const |
Definition at line 43 of file Range.cc.
References octave::math::isnan(), octave::math::nint_big(), rng_base, rng_inc, and rng_numel.
Referenced by octave_range::index_vector(), and limit_internal().
|
inline |
Definition at line 83 of file Range.h.
Referenced by image_region::image_region(), octave_range::complex_value(), octave_range::double_value(), octave_range::float_complex_value(), octave_range::float_value(), octave_range::short_disp(), and octave_range::try_narrowing_conversion().
double Range::checkelem | ( | octave_idx_type | i | ) | const |
Definition at line 113 of file Range.cc.
References dims(), octave::err_index_out_of_range(), rng_base, rng_inc, rng_limit, and rng_numel.
Referenced by checkelem().
double Range::checkelem | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) | const |
Definition at line 127 of file Range.cc.
References checkelem(), dims(), octave::err_index_out_of_range(), and rng_numel.
|
inlineprivate |
Definition at line 167 of file Range.h.
References Matrix::resize().
Referenced by init(), and sort_internal().
|
inline |
|
inline |
Matrix Range::diag | ( | octave_idx_type | k = 0 | ) | const |
Definition at line 295 of file Range.cc.
References Matrix::diag(), and matrix_value().
Referenced by octave_range::diag().
|
inline |
Definition at line 89 of file Range.h.
Referenced by checkelem(), and index().
double Range::elem | ( | octave_idx_type | i | ) | const |
Definition at line 137 of file Range.cc.
References rng_base, rng_inc, and rng_numel.
Referenced by octave_range::do_index_op(), octave_range::edit_display(), octave_range::fast_elem_extract(), and octave::tree_evaluator::visit_simple_for_command().
|
inline |
|
inline |
Definition at line 85 of file Range.h.
Referenced by image_region::image_region(), do_minmax_body(), and octave_range::short_disp().
Array< double > Range::index | ( | const idx_vector & | i | ) | const |
Definition at line 172 of file Range.cc.
References Array< T >::clear(), dims(), octave::err_index_out_of_range(), idx_vector::extent(), Array< T >::fortran_vec(), idx_vector::is_colon(), dim_vector::isvector(), idx_vector::length(), idx_vector::loop(), matrix_value(), n, idx_vector::orig_dimensions(), MArray< T >::reshape(), retval, rng_base, rng_inc, rng_limit, and rng_numel.
Referenced by octave_range::do_index_op().
|
private |
Definition at line 620 of file Range.cc.
References clear_cache(), limit_internal(), numel_internal(), rng_limit, and rng_numel.
Referenced by set_base(), set_inc(), and set_limit().
|
inline |
Definition at line 96 of file Range.h.
References numel().
Referenced by octave_range::is_true(), and nnz().
|
inline |
Definition at line 84 of file Range.h.
Referenced by octave_range::short_disp().
|
private |
Definition at line 603 of file Range.cc.
References all_elements_are_ints(), max(), min(), rng_inc, and octave::math::round().
Referenced by init().
Matrix Range::matrix_value | ( | void | ) | const |
Definition at line 91 of file Range.cc.
References cache, Array< T >::isempty(), Matrix::resize(), rng_base, rng_inc, rng_limit, rng_numel, and Array< T >::xelem().
Referenced by octave_range::all(), octave_range::any(), octave_range::as_int16(), octave_range::as_int32(), octave_range::as_int64(), octave_range::as_int8(), octave_range::as_single(), octave_range::as_uint16(), octave_range::as_uint32(), octave_range::as_uint64(), octave_range::as_uint8(), octave_range::bool_array_value(), octave_range::char_array_value(), octave_range::convert_to_str_internal(), octave_range::diag(), diag(), octave_range::do_index_op(), index(), octave_range::is_true(), and octave_range::try_narrowing_conversion().
double Range::max | ( | void | ) | const |
Definition at line 230 of file Range.cc.
References retval, rng_base, rng_inc, rng_limit, and rng_numel.
Referenced by image_region::image_region(), do_minmax_body(), and limit_internal().
double Range::min | ( | void | ) | const |
Definition at line 209 of file Range.cc.
References retval, rng_base, rng_inc, rng_limit, and rng_numel.
Referenced by do_minmax_body(), and limit_internal().
octave_idx_type Range::nnz | ( | void | ) | const |
|
inline |
Definition at line 87 of file Range.h.
Referenced by image_region::image_region(), octave_range::complex_value(), octave_range::do_index_op(), do_minmax_body(), octave_range::double_value(), octave_range::fast_elem_extract(), octave_range::float_complex_value(), octave_range::float_value(), octave::octave_jit_compute_nelem(), octave_range::print_name_tag(), octave_range::short_disp(), sort_internal(), octave::tree_jit::trip_count(), octave_range::try_narrowing_conversion(), and octave::tree_evaluator::visit_simple_for_command().
|
private |
|
inline |
|
inline |
|
inline |
void Range::set_base | ( | double | b | ) |
void Range::set_inc | ( | double | i | ) |
void Range::set_limit | ( | double | l | ) |
Range Range::sort | ( | Array< octave_idx_type > & | sidx, |
octave_idx_type | dim = 0 , |
||
sortmode | mode = ASCENDING |
||
) | const |
Definition at line 319 of file Range.cc.
References ASCENDING, DESCENDING, and retval.
Range Range::sort | ( | octave_idx_type | dim = 0 , |
sortmode | mode = ASCENDING |
||
) | const |
Definition at line 301 of file Range.cc.
References ASCENDING, DESCENDING, and retval.
void Range::sort_internal | ( | Array< octave_idx_type > & | sidx, |
bool | ascending = true |
||
) |
Definition at line 268 of file Range.cc.
References clear_cache(), Array< T >::fortran_vec(), numel(), Array< T >::resize(), rng_base, rng_inc, and rng_limit.
void Range::sort_internal | ( | bool | ascending = true | ) |
|
friend |
|
friend |
|
mutableprivate |
Definition at line 159 of file Range.h.
Referenced by matrix_value().
|
private |
Definition at line 153 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), elem(), index(), matrix_value(), max(), min(), nnz(), numel_internal(), set_base(), and sort_internal().
|
private |
Definition at line 155 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), elem(), index(), issorted(), limit_internal(), matrix_value(), max(), min(), nnz(), numel_internal(), set_inc(), and sort_internal().
|
private |
Definition at line 154 of file Range.h.
Referenced by checkelem(), index(), init(), matrix_value(), max(), min(), nnz(), numel_internal(), set_limit(), and sort_internal().
|
private |
Definition at line 157 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), elem(), index(), init(), issorted(), matrix_value(), max(), min(), and nnz().