GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "oct-map.h"
Public Types | |
typedef octave_fields::const_iterator | const_iterator |
typedef octave_scalar_map | element_type |
typedef const_iterator | iterator |
Static Public Member Functions | |
static octave_map | cat (int dim, octave_idx_type n, const octave_scalar_map *map_list) |
static octave_map | cat (int dim, octave_idx_type n, const octave_map *map_list) |
Private Member Functions | |
void | extract_scalar (octave_scalar_map &dest, octave_idx_type index) const |
void | optimize_dimensions (void) |
Static Private Member Functions | |
static void | do_cat (int dim, octave_idx_type n, const octave_scalar_map *map_list, octave_map &retval) |
static void | do_cat (int dim, octave_idx_type n, const octave_map *map_list, octave_map &retval) |
Private Attributes | |
dim_vector | dimensions |
octave_fields | xkeys |
std::vector< Cell > | xvals |
typedef const_iterator octave_map::iterator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
octave_map::octave_map | ( | const octave_scalar_map & | m | ) |
Definition at line 242 of file oct-map.cc.
References dimensions, octave_scalar_map::nfields(), octave_scalar_map::xvals, and xvals.
octave_map::octave_map | ( | const Octave_map & | m | ) |
Definition at line 254 of file oct-map.cc.
References begin(), contents(), Octave_map::contents(), end(), key(), and optimize_dimensions().
Definition at line 350 of file oct-map.h.
Referenced by mxArray_struct::as_octave_value(), assign(), DEFUN(), F__ftp_dir__(), F__which__(), Fdbstatus(), Fwarning(), base_properties::get(), root_figure::properties::get(), figure::properties::get(), axes::properties::get(), line::properties::get(), text::properties::get(), image::properties::get(), patch::properties::get(), surface::properties::get(), hggroup::properties::get(), uimenu::properties::get(), uicontextmenu::properties::get(), uicontrol::properties::get(), uipanel::properties::get(), uitoolbar::properties::get(), uipushtool::properties::get(), uitoggletool::properties::get(), profile_data_accumulator::get_flat(), profile_data_accumulator::tree_node::get_hierarchical(), octave_class::load_ascii(), octave_class::load_binary(), octave_class::load_hdf5(), tree_index_expression::make_arg_struct(), make_idx_args(), symbol_info_list::map_value(), octave_class::octave_class(), read_mat5_binary_element(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::assign | ( | const idx_vector & | i, |
const octave_map & | rhs | ||
) |
Definition at line 971 of file oct-map.cc.
References assign(), dimensions, error(), error_state, octave_fields::is_same(), nfields(), optimize_dimensions(), orderfields(), xkeys, and xvals.
void octave_map::assign | ( | const idx_vector & | i, |
const idx_vector & | j, | ||
const octave_map & | rhs | ||
) |
Definition at line 1013 of file oct-map.cc.
References assign(), dimensions, error(), error_state, octave_fields::is_same(), nfields(), optimize_dimensions(), orderfields(), xkeys, and xvals.
void octave_map::assign | ( | const Array< idx_vector > & | ia, |
const octave_map & | rhs | ||
) |
Definition at line 1056 of file oct-map.cc.
References assign(), dimensions, error(), error_state, octave_fields::is_same(), nfields(), optimize_dimensions(), orderfields(), xkeys, and xvals.
void octave_map::assign | ( | const octave_value_list & | idx, |
const octave_map & | rhs | ||
) |
Definition at line 1099 of file oct-map.cc.
References assign(), error_state, and octave_value_list::length().
void octave_map::assign | ( | const octave_value_list & | idx, |
const std::string & | k, | ||
const Cell & | rhs | ||
) |
Definition at line 1147 of file oct-map.cc.
References Cell::assign(), contents(), dimensions, Array< T >::dims(), end(), error_state, nfields(), optimize_dimensions(), seek(), setfield(), and xvals.
|
inline |
Definition at line 306 of file oct-map.h.
Referenced by octave_struct::byte_size(), octave_class::byte_size(), concat(), octave_map(), Octave_map::Octave_map(), octave_class::reconstruct_parents(), base_graphics_object::remove_all_listeners(), octave_class::save_ascii(), octave_class::save_binary(), octave_class::save_hdf5(), save_mat5_element_length(), and base_graphics_object::values_as_string().
|
static |
Definition at line 668 of file oct-map.cc.
References dimensions, do_cat(), octave_fields::is_same(), octave_scalar_map::nfields(), OCTAVE_LOCAL_BUFFER, optimize_dimensions(), permute_to_correct_order(), dim_vector::resize(), octave_scalar_map::xkeys, and xkeys.
Referenced by Fget(), single_type_concat(), and single_type_concat_map().
|
static |
Definition at line 733 of file oct-map.cc.
References dim_vector::concat(), dimensions, do_cat(), error(), octave_fields::is_same(), nfields(), OCTAVE_LOCAL_BUFFER, optimize_dimensions(), permute_to_correct_order(), and xkeys.
octave_scalar_map octave_map::checkelem | ( | octave_idx_type | n | ) | const |
Definition at line 363 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), and xkeys.
Referenced by DEFUN_DLD(), octave_struct::fast_elem_extract(), octave_base_value::scalar_map_value(), and octave_struct::try_narrowing_conversion().
octave_scalar_map octave_map::checkelem | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) | const |
Definition at line 374 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), and xkeys.
octave_scalar_map octave_map::checkelem | ( | const Array< octave_idx_type > & | ra_idx | ) | const |
Definition at line 385 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), and xkeys.
Definition at line 367 of file oct-map.h.
Referenced by Fwarning().
|
inline |
octave_map octave_map::column | ( | octave_idx_type | k | ) | const |
Definition at line 956 of file oct-map.cc.
References idx_vector::colon, and index().
|
inline |
octave_map octave_map::concat | ( | const octave_map & | rb, |
const Array< octave_idx_type > & | ra_idx | ||
) |
Definition at line 1271 of file oct-map.cc.
References dim_vector::all_zero(), begin(), contents(), dims(), end(), error(), Cell::insert(), key(), nfields(), and seek().
|
inline |
Definition at line 335 of file oct-map.h.
Referenced by decode_subscripts(), Frethrow(), Fwarning(), octave_class::reconstruct_parents(), and octave_class::subsasgn_common().
|
inline |
Definition at line 316 of file oct-map.h.
Referenced by octave_struct::as_mxArray(), assign(), octave_struct::byte_size(), octave_class::byte_size(), concat(), decode_subscripts(), DEFUN(), octave_call_stack::do_backtrace(), do_dbstack(), octave_struct::dotref(), octave_class::dotref(), octave_class::find_parent_class(), Frethrow(), Fwarning(), octave_map(), Octave_map::Octave_map(), pr_where(), octave_struct::print_raw(), read_mat5_binary_element(), octave_class::reconstruct_parents(), octave_user_function::restore_warning_states(), octave_struct::save_ascii(), octave_class::save_ascii(), octave_struct::save_binary(), octave_class::save_binary(), octave_struct::save_hdf5(), octave_class::save_hdf5(), save_mat5_binary_element(), save_mat5_element_length(), graphics_object::set(), octave_struct::subsasgn(), octave_class::subsasgn_common(), octave_class::unique_parent_class(), tree_evaluator::visit_complex_for_command(), warning_enabled(), and warning_query().
|
inline |
|
inline |
Cell octave_map::contents | ( | const std::string & | k | ) | const |
Definition at line 339 of file oct-map.cc.
References getfield().
Cell & octave_map::contents | ( | const std::string & | k | ) |
Definition at line 345 of file oct-map.cc.
References dimensions, octave_fields::getfield(), xkeys, and xvals.
void octave_map::delete_elements | ( | const idx_vector & | i | ) |
Definition at line 1185 of file oct-map.cc.
References Array< T >::delete_elements(), dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), and xvals.
Referenced by DEFUN_DLD(), delete_elements(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::delete_elements | ( | int | dim, |
const idx_vector & | i | ||
) |
Definition at line 1205 of file oct-map.cc.
References delete_elements(), Array< T >::delete_elements(), dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), and xvals.
void octave_map::delete_elements | ( | const Array< idx_vector > & | ia | ) |
Definition at line 1225 of file oct-map.cc.
References delete_elements(), Array< T >::delete_elements(), dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), and xvals.
void octave_map::delete_elements | ( | const octave_value_list & | idx | ) |
Definition at line 1245 of file oct-map.cc.
References delete_elements(), error_state, and octave_value_list::length().
|
inline |
Definition at line 402 of file oct-map.h.
Referenced by concat(), DEFUN(), octave_class::octave_class(), and permute_to_correct_order1().
|
staticprivate |
Definition at line 578 of file oct-map.cc.
References dimensions, nfields(), dim_vector::resize(), octave_scalar_map::xvals, and xvals.
Referenced by cat().
|
staticprivate |
Definition at line 600 of file oct-map.cc.
References dimensions, nfields(), OCTAVE_LOCAL_BUFFER, and xvals.
|
inline |
Definition at line 307 of file oct-map.h.
Referenced by assign(), octave_struct::byte_size(), octave_class::byte_size(), concat(), octave_struct::dotref(), octave_class::dotref(), octave_map(), Octave_map::Octave_map(), octave_class::reconstruct_parents(), base_graphics_object::remove_all_listeners(), octave_class::save_ascii(), octave_class::save_binary(), octave_class::save_hdf5(), save_mat5_element_length(), octave_struct::subsasgn(), octave_class::subsasgn_common(), and base_graphics_object::values_as_string().
|
private |
Definition at line 354 of file oct-map.cc.
References nfields(), octave_scalar_map::xvals, and xvals.
Referenced by checkelem(), and fast_elem_extract().
octave_scalar_map octave_map::fast_elem_extract | ( | octave_idx_type | n | ) | const |
Definition at line 396 of file oct-map.cc.
References extract_scalar(), and xkeys.
bool octave_map::fast_elem_insert | ( | octave_idx_type | n, |
const octave_scalar_map & | rhs | ||
) |
Definition at line 406 of file oct-map.cc.
References octave_fields::equal_up_to_order(), octave_fields::is_same(), nfields(), OCTAVE_LOCAL_BUFFER, octave_scalar_map::xkeys, xkeys, octave_scalar_map::xvals, and xvals.
Referenced by DEFUN_DLD(), and octave_struct::fast_elem_insert().
|
inline |
Definition at line 338 of file oct-map.h.
Referenced by DEFUN(), Octave_map::Octave_map(), octave_struct::print_raw(), octave_struct::save_ascii(), octave_scalar_struct::save_ascii(), octave_struct::save_binary(), octave_scalar_struct::save_binary(), and octave_struct::save_hdf5().
Cell octave_map::getfield | ( | const std::string & | key | ) | const |
Definition at line 264 of file oct-map.cc.
References octave_fields::getfield(), xkeys, and xvals.
Referenced by contents().
|
inline |
Definition at line 313 of file oct-map.h.
Referenced by column(), octave_struct::do_index_op(), octave_scalar_struct::do_index_op(), index(), octave_class::octave_class(), page(), and octave_class::subsref().
octave_map octave_map::index | ( | const idx_vector & | i, |
bool | resize_ok = false |
||
) | const |
Definition at line 831 of file oct-map.cc.
References dimensions, Array< T >::dims(), Array< T >::index(), nfields(), optimize_dimensions(), xkeys, and xvals.
octave_map octave_map::index | ( | const idx_vector & | i, |
const idx_vector & | j, | ||
bool | resize_ok = false |
||
) | const |
Definition at line 855 of file oct-map.cc.
References dimensions, Array< T >::dims(), Array< T >::index(), nfields(), optimize_dimensions(), xkeys, and xvals.
octave_map octave_map::index | ( | const Array< idx_vector > & | ia, |
bool | resize_ok = false |
||
) | const |
Definition at line 880 of file oct-map.cc.
References dimensions, Array< T >::dims(), Array< T >::index(), nfields(), optimize_dimensions(), xkeys, and xvals.
octave_map octave_map::index | ( | const octave_value_list & | idx, |
bool | resize_ok = false |
||
) | const |
Definition at line 904 of file oct-map.cc.
References error_state, index(), and octave_value_list::length().
Definition at line 376 of file oct-map.h.
Referenced by permute_to_correct_order1().
|
inline |
|
inline |
Definition at line 311 of file oct-map.h.
Referenced by octave_struct::byte_size(), octave_class::byte_size(), concat(), octave_map(), Octave_map::Octave_map(), octave_class::reconstruct_parents(), octave_class::save_ascii(), octave_class::save_binary(), and octave_class::save_hdf5().
|
inline |
Definition at line 341 of file oct-map.h.
Referenced by octave_class::exemplar_info::compare(), octave_class::exemplar_info::exemplar_info(), permute_to_correct_order1(), save_mat5_binary_element(), graphics_object::set(), and tree_evaluator::visit_complex_for_command().
|
inline |
Definition at line 375 of file oct-map.h.
Referenced by DEFUN(), and Fdbstatus().
Definition at line 404 of file oct-map.h.
Referenced by transpose().
|
inline |
Definition at line 329 of file oct-map.h.
Referenced by assign(), cat(), concat(), decode_subscripts(), DEFUN(), delete_elements(), do_cat(), extract_scalar(), fast_elem_insert(), index(), octave_class::octave_class(), optimize_dimensions(), orderfields(), permute(), permute_to_correct_order1(), reshape(), resize(), octave_struct::save_ascii(), octave_class::save_ascii(), octave_scalar_struct::save_ascii(), octave_struct::save_binary(), octave_class::save_binary(), octave_scalar_struct::save_binary(), octave_struct::save_hdf5(), save_mat5_binary_element(), graphics_object::set(), setfield(), squeeze(), and transpose().
|
inline |
Definition at line 374 of file oct-map.h.
Referenced by decode_subscripts(), DEFUN(), DEFUN_DLD(), do_dbstack(), octave_struct::fast_elem_extract(), octave_struct::fast_elem_insert(), Frethrow(), octave_class::octave_class(), pr_where(), octave_user_function::restore_warning_states(), save_mat5_binary_element(), save_mat5_element_length(), octave_base_value::scalar_map_value(), graphics_object::set(), octave_struct::subsref(), octave_class::subsref(), and warning_enabled().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 292 of file oct-map.h.
References dimensions, xkeys, and xvals.
Definition at line 1302 of file oct-map.cc.
References dimensions, error(), nfields(), and xvals.
Referenced by assign(), cat(), delete_elements(), index(), octave_map(), permute(), reshape(), resize(), squeeze(), and transpose().
octave_map octave_map::orderfields | ( | void | ) | const |
Definition at line 297 of file oct-map.cc.
Referenced by assign(), and permute_to_correct_order1().
octave_map octave_map::orderfields | ( | Array< octave_idx_type > & | perm | ) | const |
Definition at line 304 of file oct-map.cc.
References nfields(), octave_fields::orderfields(), Array< T >::xelem(), xkeys, and xvals.
octave_map octave_map::orderfields | ( | const octave_map & | other, |
Array< octave_idx_type > & | perm | ||
) | const |
Definition at line 317 of file oct-map.cc.
References octave_fields::equal_up_to_order(), error(), octave_fields::is_same(), nfields(), Array< T >::xelem(), xkeys, and xvals.
octave_map octave_map::page | ( | octave_idx_type | k | ) | const |
Definition at line 962 of file oct-map.cc.
References idx_vector::colon, and index().
octave_map octave_map::permute | ( | const Array< int > & | vec, |
bool | inv = false |
||
) | const |
Definition at line 458 of file oct-map.cc.
References dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), Array< T >::permute(), xkeys, and xvals.
Referenced by octave_scalar_struct::permute().
octave_map octave_map::reshape | ( | const dim_vector & | dv | ) | const |
Definition at line 519 of file oct-map.cc.
References dimensions, nfields(), optimize_dimensions(), Array< T >::reshape(), xkeys, and xvals.
Referenced by octave_class::reshape(), and octave_scalar_struct::reshape().
void octave_map::resize | ( | const dim_vector & | dv, |
bool | fill = false |
||
) |
Definition at line 552 of file oct-map.cc.
References dimensions, nfields(), optimize_dimensions(), Array< T >::resize(), and xvals.
Referenced by DEFUN(), Fwarning(), octave_class::octave_class(), octave_struct::resize(), octave_class::resize(), and octave_scalar_struct::resize().
void octave_map::rmfield | ( | const std::string & | key | ) |
Definition at line 289 of file oct-map.cc.
References octave_fields::rmfield(), xkeys, and xvals.
Referenced by DEFUN().
|
inline |
|
inline |
Definition at line 309 of file oct-map.h.
Referenced by assign(), concat(), octave_struct::dotref(), octave_class::dotref(), octave_class::find_parent_class(), octave_struct::subsasgn(), octave_class::subsasgn_common(), and octave_class::unique_parent_class().
Definition at line 271 of file oct-map.cc.
References dimensions, Array< T >::dims(), error(), octave_fields::getfield(), nfields(), xkeys, and xvals.
Referenced by assign(), DEFUN(), DEFUN_DLD(), octave_struct::load_ascii(), octave_struct::load_binary(), octave_struct::load_hdf5(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
octave_map octave_map::squeeze | ( | void | ) | const |
Definition at line 435 of file oct-map.cc.
References dimensions, nfields(), optimize_dimensions(), dim_vector::squeeze(), and xvals.
octave_map octave_map::transpose | ( | void | ) | const |
Definition at line 492 of file oct-map.cc.
References dimensions, ndims(), nfields(), optimize_dimensions(), xkeys, and xvals.
|
private |
Definition at line 463 of file oct-map.h.
Referenced by assign(), cat(), checkelem(), contents(), delete_elements(), do_cat(), index(), octave_map(), operator=(), optimize_dimensions(), permute(), reshape(), resize(), setfield(), squeeze(), and transpose().
|
private |
Definition at line 461 of file oct-map.h.
Referenced by assign(), cat(), checkelem(), contents(), fast_elem_extract(), fast_elem_insert(), getfield(), index(), operator=(), orderfields(), permute(), reshape(), rmfield(), setfield(), and transpose().
|
private |
Definition at line 462 of file oct-map.h.
Referenced by assign(), contents(), delete_elements(), do_cat(), extract_scalar(), fast_elem_insert(), getfield(), index(), octave_map(), operator=(), optimize_dimensions(), orderfields(), permute(), reshape(), resize(), rmfield(), setfield(), squeeze(), and transpose().