#include "Range.h"
Public Member Functions | |
Range (void) | |
Range (const Range &r) | |
Range (double b, double l, double i) | |
Range (double b, double i, octave_idx_type n) | |
Range (double b, double l) | |
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 (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 (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+ (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 std::ostream & | operator<< (std::ostream &os, const Range &r) |
OCTAVE_API std::istream & | operator>> (std::istream &is, Range &r) |
Definition at line 31 of file Range.h.
Range::Range | ( | double | b, | |
double | i, | |||
octave_idx_type | n | |||
) |
bool Range::all_elements_are_ints | ( | void | ) | const |
Definition at line 48 of file Range.cc.
References NINTbig(), rng_base, rng_inc, rng_nelem, and xisnan().
Referenced by do_rand(), elem_xpow(), idx_vector::idx_range_rep::idx_range_rep(), octave_range::index_vector(), and set_format().
double Range::base | ( | void | ) | const [inline] |
Definition at line 55 of file Range.h.
Referenced by octave_range::complex_value(), DEFUN(), do_rand(), octave_range::double_value(), elem_xpow(), 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(), save_mat_binary_data(), set_format(), octave_range::try_narrowing_conversion(), and tree_evaluator::visit_simple_for_command().
double Range::checkelem | ( | octave_idx_type | i | ) | const |
void Range::clear_cache | ( | void | ) | const [inline, private] |
Matrix Range::diag | ( | octave_idx_type | k = 0 |
) | const |
Definition at line 239 of file Range.cc.
References Matrix::diag(), and matrix_value().
Referenced by octave_range::diag().
double Range::elem | ( | octave_idx_type | i | ) | const [inline] |
Definition at line 83 of file Range.h.
Referenced by octave_range::do_index_op().
double Range::inc | ( | void | ) | const [inline] |
Definition at line 57 of file Range.h.
Referenced by DEFUN(), do_minmax_body(), do_rand(), elem_xpow(), idx_vector::idx_range_rep::idx_range_rep(), octave_print_internal(), operator*(), operator+(), operator-(), operator<<(), octave_range::save_ascii(), octave_range::save_binary(), save_mat_binary_data(), and tree_evaluator::visit_simple_for_command().
Array< double > Range::index | ( | const idx_vector & | i | ) | const |
Definition at line 103 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, and rng_nelem.
Referenced by octave_range::do_index_op().
double Range::limit | ( | void | ) | const [inline] |
Definition at line 56 of file Range.h.
Referenced by elem_xpow(), octave_print_internal(), octave_range::save_ascii(), octave_range::save_binary(), and set_format().
Matrix Range::matrix_value | ( | void | ) | const |
Definition at line 60 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(), octave_range::diag(), diag(), octave_range::do_index_op(), elem_xpow(), index(), octave_range::is_true(), operator*(), operator+(), operator-(), and octave_range::try_narrowing_conversion().
double Range::max | ( | void | ) | const |
Definition at line 159 of file Range.cc.
References rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by do_minmax_body(), nelem_internal(), and operator<<().
double Range::min | ( | void | ) | const |
Definition at line 137 of file Range.cc.
References rng_base, rng_inc, rng_limit, and rng_nelem.
Referenced by do_minmax_body(), operator<<(), and sort_internal().
octave_idx_type Range::nelem | ( | void | ) | const [inline] |
Definition at line 58 of file Range.h.
Referenced by 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_print_internal(), operator*(), operator+(), operator-(), operator<<(), octave_range::print_name_tag(), octave_range::save_ascii(), octave_range::save_binary(), save_mat_binary_data(), sort_internal(), octave_range::try_narrowing_conversion(), and tree_evaluator::visit_simple_for_command().
octave_idx_type Range::nelem_internal | ( | void | ) | const [private] |
void Range::print_range | ( | void | ) |
Range Range::sort | ( | Array< octave_idx_type > & | sidx, | |
octave_idx_type | dim = 0 , |
|||
sortmode | mode = ASCENDING | |||
) | const |
Definition at line 263 of file Range.cc.
References ASCENDING, DESCENDING, and sort_internal().
Range Range::sort | ( | octave_idx_type | dim = 0 , |
|
sortmode | mode = ASCENDING | |||
) | const |
Definition at line 245 of file Range.cc.
References ASCENDING, DESCENDING, and sort_internal().
void Range::sort_internal | ( | bool | ascending = true |
) |
void Range::sort_internal | ( | Array< octave_idx_type > & | sidx, | |
bool | ascending = true | |||
) |
Definition at line 201 of file Range.cc.
References clear_cache(), Array< T >::fortran_vec(), min(), nelem(), Array< T >::resize(), rng_base, rng_inc, and rng_limit.
OCTAVE_API std::ostream& operator<< | ( | std::ostream & | os, | |
const Range & | r | |||
) | [friend] |
OCTAVE_API std::istream& operator>> | ( | std::istream & | is, | |
Range & | r | |||
) | [friend] |
Matrix Range::cache [mutable, private] |
Definition at line 142 of file Range.h.
Referenced by matrix_value().
double Range::rng_base [private] |
Definition at line 136 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), index(), matrix_value(), max(), min(), nelem_internal(), operator>>(), and sort_internal().
double Range::rng_inc [private] |
Definition at line 138 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), index(), is_sorted(), matrix_value(), max(), min(), nelem_internal(), operator>>(), and sort_internal().
double Range::rng_limit [private] |
Definition at line 137 of file Range.h.
Referenced by matrix_value(), max(), min(), nelem_internal(), operator>>(), and sort_internal().
octave_idx_type Range::rng_nelem [private] |
Definition at line 140 of file Range.h.
Referenced by all_elements_are_ints(), checkelem(), index(), is_sorted(), matrix_value(), max(), min(), operator>>(), and Range().