GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "Range.h"
Public Member Functions | |
Range (void) | |
Range (const Range &r) | |
Range (double b, double l) | |
Range (double b, double l, double i) | |
Range (double b, double i, octave_idx_type n) | |
bool | all_elements_are_ints (void) const |
double | base (void) const |
double | checkelem (octave_idx_type i) const |
Matrix | diag (octave_idx_type k=0) const |
double | elem (octave_idx_type i) const |
double | inc (void) const |
Array< double > | index (const idx_vector &i) const |
sortmode | is_sorted (sortmode mode=ASCENDING) const |
double | limit (void) const |
Matrix | matrix_value (void) const |
double | max (void) const |
double | min (void) const |
octave_idx_type | nelem (void) const |
void | print_range (void) |
void | set_base (double b) |
void | set_inc (double i) |
void | set_limit (double l) |
Range | sort (octave_idx_type dim=0, sortmode mode=ASCENDING) const |
Range | sort (Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const |
void | sort_internal (bool ascending=true) |
void | sort_internal (Array< octave_idx_type > &sidx, bool ascending=true) |
Private Member Functions | |
void | clear_cache (void) const |
octave_idx_type | nelem_internal (void) const |
Private Attributes | |
Matrix | cache |
double | rng_base |
double | rng_inc |
double | rng_limit |
octave_idx_type | rng_nelem |
Friends | |
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, double x) |
OCTAVE_API Range | operator- (const Range &r) |
OCTAVE_API Range | operator- (double x, const Range &r) |
OCTAVE_API Range | operator- (const Range &r, double x) |
OCTAVE_API std::ostream & | operator<< (std::ostream &os, const Range &r) |
OCTAVE_API std::istream & | operator>> (std::istream &is, Range &r) |
|
inline |
Definition at line 40 of file Range.cc.
References NINTbig(), rng_base, rng_inc, rng_nelem, and xisnan().
Referenced by jit_range::all_elements_are_ints(), do_rand(), elem_xpow(), idx_vector::idx_range_rep::idx_range_rep(), octave_range::index_vector(), and set_format().
Definition at line 61 of file Range.h.
Referenced by calculate_region(), octave_range::complex_value(), do_rand(), octave_range::double_value(), elem_xpow(), F__accumarray_sum__(), octave_range::float_complex_value(), octave_range::float_value(), idx_vector::idx_range_rep::idx_range_rep(), octave_print_internal(), operator*(), operator+(), operator-(), operator<<(), octave_range::save_ascii(), octave_range::save_binary(), octave_range::save_hdf5(), save_mat_binary_data(), set_format(), octave_range::short_disp(), octave_range::try_narrowing_conversion(), and tree_evaluator::visit_simple_for_command().
double Range::checkelem | ( | octave_idx_type | i | ) | const |
Matrix Range::diag | ( | octave_idx_type | k = 0 | ) | const |
Definition at line 294 of file Range.cc.
References Matrix::diag(), and matrix_value().
Referenced by octave_range::diag().
double Range::elem | ( | octave_idx_type | i | ) | const |
Definition at line 105 of file Range.cc.
References checkelem(), rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by octave_range::do_index_op().
Definition at line 63 of file Range.h.
Referenced by calculate_region(), do_minmax_body(), do_rand(), elem_xpow(), F__accumarray_sum__(), idx_vector::idx_range_rep::idx_range_rep(), octave_print_internal(), operator*(), operator+(), operator-(), operator<<(), passb(), passf(), octave_range::save_ascii(), octave_range::save_binary(), octave_range::save_hdf5(), save_mat_binary_data(), octave_range::short_disp(), tree_evaluator::visit_simple_for_command(), zpassb(), and zpassf().
Array< double > Range::index | ( | const idx_vector & | i | ) | const |
Definition at line 157 of file Range.cc.
References Array< T >::clear(), idx_vector::extent(), Array< T >::fortran_vec(), gripe_index_out_of_range(), idx_vector::is_colon(), dim_vector::is_vector(), idx_vector::length(), idx_vector::loop(), matrix_value(), idx_vector::orig_dimensions(), MArray< T >::reshape(), rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by octave_range::do_index_op().
Definition at line 62 of file Range.h.
Referenced by dqagi(), dqagie(), dqagp(), dqagpe(), dqpsrt(), elem_xpow(), octave_print_internal(), qagi(), qagie(), qagp(), qagpe(), qpsrt(), octave_range::save_ascii(), octave_range::save_binary(), octave_range::save_hdf5(), set_format(), and octave_range::short_disp().
Definition at line 52 of file Range.cc.
References cache, Array< T >::nelem(), Matrix::resize(), rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by octave_range::all(), octave_range::any(), octave_range::bool_array_value(), octave_range::char_array_value(), octave_range::convert_to_str_internal(), diag(), octave_range::diag(), octave_range::do_index_op(), elem_xpow(), index(), octave_range::is_true(), operator*(), operator+(), operator-(), and octave_range::try_narrowing_conversion().
Definition at line 215 of file Range.cc.
References rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by calculate_region(), do_minmax_body(), and operator<<().
Definition at line 194 of file Range.cc.
References rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by do_minmax_body(), operator<<(), and sort_internal().
|
inline |
Definition at line 64 of file Range.h.
Referenced by calculate_region(), octave_range::complex_value(), octave_range::do_index_op(), do_minmax_body(), do_rand(), octave_range::double_value(), elem_xpow(), octave_range::float_complex_value(), octave_range::float_value(), octave_range::is_true(), octave_jit_compute_nelem(), octave_print_internal(), operator*(), operator+(), operator-(), operator<<(), octave_range::print_name_tag(), octave_range::save_ascii(), octave_range::save_binary(), octave_range::save_hdf5(), save_mat_binary_data(), octave_range::short_disp(), sort_internal(), tree_jit::trip_count(), octave_range::try_narrowing_conversion(), and tree_evaluator::visit_simple_for_command().
|
private |
Range Range::sort | ( | octave_idx_type | dim = 0 , |
sortmode | mode = ASCENDING |
||
) | const |
Definition at line 300 of file Range.cc.
References ASCENDING, DESCENDING, and sort_internal().
Range Range::sort | ( | Array< octave_idx_type > & | sidx, |
octave_idx_type | dim = 0 , |
||
sortmode | mode = ASCENDING |
||
) | const |
Definition at line 318 of file Range.cc.
References ASCENDING, DESCENDING, and sort_internal().
void Range::sort_internal | ( | Array< octave_idx_type > & | sidx, |
bool | ascending = true |
||
) |
Definition at line 256 of file Range.cc.
References clear_cache(), Array< T >::fortran_vec(), min(), nelem(), Array< T >::resize(), rng_base, rng_inc, and rng_limit.
|
friend |
|
friend |
|
mutableprivate |
Definition at line 142 of file Range.h.
Referenced by matrix_value(), operator*(), operator+(), and operator-().
|
private |
Definition at line 136 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), elem(), index(), matrix_value(), max(), min(), nelem_internal(), operator>>(), and sort_internal().
|
private |
Definition at line 138 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), elem(), index(), is_sorted(), matrix_value(), max(), min(), nelem_internal(), operator>>(), and sort_internal().
|
private |
Definition at line 137 of file Range.h.
Referenced by checkelem(), elem(), index(), matrix_value(), max(), min(), nelem_internal(), operator>>(), and sort_internal().
|
private |
Definition at line 140 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), elem(), index(), is_sorted(), matrix_value(), max(), min(), and operator>>().