#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_map *map_list) |
static octave_map | cat (int dim, octave_idx_type n, const octave_scalar_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_map *map_list, octave_map &retval) |
static void | do_cat (int dim, octave_idx_type n, const octave_scalar_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 262 of file oct-map.cc.
References dimensions, m, and xvals.
void octave_map::assign | ( | const Array< idx_vector > & | ia, |
const octave_map & | rhs | ||
) |
Definition at line 1089 of file oct-map.cc.
References assign(), dimensions, error(), 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 1041 of file oct-map.cc.
References assign(), dimensions, error(), octave_fields::is_same(), nfields(), optimize_dimensions(), orderfields(), xkeys, and xvals.
void octave_map::assign | ( | const idx_vector & | i, |
const octave_map & | rhs | ||
) |
Definition at line 994 of file oct-map.cc.
References assign(), dimensions, error(), 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 1137 of file oct-map.cc.
References assign(), octave_value_list::length(), and octave::index_exception::set_pos_if_unset().
void octave_map::assign | ( | const octave_value_list & | idx, |
const std::string & | k, | ||
const Cell & | rhs | ||
) |
Definition at line 1191 of file oct-map.cc.
References Cell::assign(), contents(), dimensions, Array< T >::dims(), end(), nfields(), optimize_dimensions(), seek(), setfield(), and xvals.
|
inline |
Definition at line 365 of file oct-map.h.
Referenced by octave_class::octave_class(), assign(), octave::ft_manager::do_get_system_fonts(), F__ftp_dir__(), F__version_info__(), Fdbstatus(), Fwarning(), octave::symbol_info_list::map_value(), octregexp(), octave::error_system::set_warning_option(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
|
inline |
Definition at line 318 of file oct-map.h.
Referenced by Fdbstatus().
|
static |
Definition at line 754 of file oct-map.cc.
References dim_vector::concat(), dimensions, Array< T >::dimensions, do_cat(), error(), octave_fields::is_same(), n, nfields(), OCTAVE_LOCAL_BUFFER, Array< T >::optimize_dimensions(), permute_to_correct_order(), retval, and xkeys.
|
static |
Definition at line 690 of file oct-map.cc.
References Array< T >::dimensions, do_cat(), error(), octave_fields::is_same(), n, octave_scalar_map::nfields(), OCTAVE_LOCAL_BUFFER, Array< T >::optimize_dimensions(), permute_to_correct_order(), dim_vector::resize(), retval, octave_scalar_map::xkeys, and xkeys.
Referenced by Fget(), octave::tm_const::map_concat(), octave::symbol_info_accumulator::map_value(), and single_type_concat_map().
|
inline |
Definition at line 321 of file oct-map.h.
Referenced by octave_class::byte_size(), octave_struct::byte_size(), concat(), and octave_class::reconstruct_parents().
|
inline |
Definition at line 322 of file oct-map.h.
Referenced by octave_class::byte_size(), octave_struct::byte_size(), concat(), and octave_class::reconstruct_parents().
|
inline |
|
inline |
|
inline |
Definition at line 399 of file oct-map.h.
Referenced by F__magick_formats__(), octave_struct::fast_elem_extract(), octave_base_value::scalar_map_value(), and octave_struct::try_narrowing_conversion().
|
inline |
Definition at line 382 of file oct-map.h.
Referenced by octave::error_system::set_warning_option().
|
inline |
octave_map octave_map::column | ( | octave_idx_type | k | ) | const |
Definition at line 979 of file oct-map.cc.
References idx_vector::colon, and index().
|
inline |
Definition at line 395 of file oct-map.h.
Referenced by octave_struct::edit_display().
octave_map octave_map::concat | ( | const octave_map & | rb, |
const Array< octave_idx_type > & | ra_idx | ||
) |
Definition at line 1320 of file oct-map.cc.
References dim_vector::all_zero(), cbegin(), cend(), contents(), dims(), error(), Cell::insert(), key(), nfields(), ra_idx, and seek().
|
inline |
Definition at line 350 of file oct-map.h.
References name.
Referenced by octave::error_system::make_stack_frame_list(), octave_class::reconstruct_parents(), octave::error_system::rethrow_error(), and octave_class::subsasgn_common().
Cell & octave_map::contents | ( | const std::string & | k | ) |
Definition at line 352 of file oct-map.cc.
References dimensions, octave_fields::getfield(), xkeys, and xvals.
Cell octave_map::contents | ( | const std::string & | k | ) | const |
Definition at line 346 of file oct-map.cc.
References getfield().
|
inline |
Definition at line 331 of file oct-map.h.
Referenced by octave_struct::as_mxArray(), assign(), octave_class::byte_size(), octave_struct::byte_size(), concat(), octave::bp_table::dbstop_process_map_args(), octave::error_system::default_warning_state(), octave::error_system::display_warning_options(), do_dbstack(), octave_class::dotref(), octave_struct::dotref(), octave_struct::edit_display(), Fdbstatus(), octave_class::find_parent_class(), octave_class::is_instance_of(), octave::error_system::make_stack_frame_list(), octave_struct::print_raw(), octave_class::reconstruct_parents(), octave_class::save_ascii(), octave_struct::save_ascii(), octave_class::save_binary(), octave_struct::save_binary(), octave_class::save_hdf5(), octave_struct::save_hdf5(), octave::error_system::set_warning_option(), octave_struct::subsasgn(), octave_class::subsasgn_common(), octave_class::unique_parent_class(), octave::file_editor_tab::update_breakpoints_handler(), octave::tree_evaluator::visit_complex_for_command(), octave::error_system::warning_enabled(), and octave::error_system::warning_query().
|
inline |
|
inline |
void octave_map::delete_elements | ( | const Array< idx_vector > & | ia | ) |
Definition at line 1269 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 idx_vector & | i | ) |
Definition at line 1229 of file oct-map.cc.
References Array< T >::delete_elements(), dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), and xvals.
Referenced by delete_elements(), F__magick_formats__(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::delete_elements | ( | const octave_value_list & | idx | ) |
Definition at line 1289 of file oct-map.cc.
References delete_elements(), octave_value_list::length(), and octave::index_exception::set_pos_if_unset().
void octave_map::delete_elements | ( | int | dim, |
const idx_vector & | i | ||
) |
Definition at line 1249 of file oct-map.cc.
References delete_elements(), Array< T >::delete_elements(), dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), and xvals.
|
inline |
Definition at line 430 of file oct-map.h.
Referenced by octave_class::octave_class(), concat(), and permute_to_correct_order1().
|
staticprivate |
Definition at line 624 of file oct-map.cc.
References Array< T >::dimensions, Array< T >::dims(), n, OCTAVE_LOCAL_BUFFER, retval, and xvals.
|
staticprivate |
Definition at line 602 of file oct-map.cc.
References Array< T >::dimensions, n, Array< T >::numel(), dim_vector::resize(), retval, Array< T >::xelem(), and octave_scalar_map::xvals.
Referenced by cat().
octave_scalar_map octave_map::elem | ( | const Array< octave_idx_type > & | ra_idx | ) | const |
Definition at line 392 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), ra_idx, retval, and xkeys.
octave_scalar_map octave_map::elem | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) | const |
Definition at line 381 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), retval, and xkeys.
octave_scalar_map octave_map::elem | ( | octave_idx_type | n | ) | const |
Definition at line 370 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), n, retval, and xkeys.
|
inline |
Definition at line 319 of file oct-map.h.
Referenced by assign(), octave_class::dotref(), octave_struct::dotref(), Fdbstatus(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
|
private |
Definition at line 361 of file oct-map.cc.
References nfields(), octave_scalar_map::xvals, and xvals.
Referenced by elem(), and fast_elem_extract().
octave_scalar_map octave_map::fast_elem_extract | ( | octave_idx_type | n | ) | const |
Definition at line 403 of file oct-map.cc.
References extract_scalar(), n, retval, and xkeys.
bool octave_map::fast_elem_insert | ( | octave_idx_type | n, |
const octave_scalar_map & | rhs | ||
) |
Definition at line 413 of file oct-map.cc.
References octave_fields::equal_up_to_order(), octave_fields::is_same(), n, nfields(), OCTAVE_LOCAL_BUFFER, retval, octave_scalar_map::xkeys, xkeys, octave_scalar_map::xvals, and xvals.
Referenced by F__magick_finfo__(), F__magick_formats__(), and octave_struct::fast_elem_insert().
|
inline |
Definition at line 353 of file oct-map.h.
Referenced by F__magick_formats__(), and octave_struct::print_raw().
Cell octave_map::getfield | ( | const std::string & | key | ) | const |
Definition at line 275 of file oct-map.cc.
References octave_fields::getfield(), xkeys, and xvals.
Referenced by contents(), Fdbstop(), and Fset().
octave_map octave_map::index | ( | const Array< idx_vector > & | ia, |
bool | resize_ok = false |
||
) | const |
Definition at line 897 of file oct-map.cc.
References dimensions, Array< T >::dimensions, Array< T >::dims(), Array< T >::index(), nfields(), Array< T >::optimize_dimensions(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const idx_vector & | i, |
bool | resize_ok = false |
||
) | const |
Definition at line 848 of file oct-map.cc.
References dimensions, Array< T >::dimensions, Array< T >::dims(), Array< T >::index(), nfields(), Array< T >::optimize_dimensions(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const idx_vector & | i, |
const idx_vector & | j, | ||
bool | resize_ok = false |
||
) | const |
Definition at line 872 of file oct-map.cc.
References dimensions, Array< T >::dimensions, Array< T >::dims(), Array< T >::index(), nfields(), Array< T >::optimize_dimensions(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const octave_value_list & | idx, |
bool | resize_ok = false |
||
) | const |
Definition at line 921 of file oct-map.cc.
References index(), octave_value_list::length(), retval, and octave::index_exception::set_pos_if_unset().
|
inline |
Definition at line 328 of file oct-map.h.
Referenced by octave_class::octave_class(), column(), octave_struct::do_index_op(), octave_scalar_struct::do_index_op(), index(), page(), and octave_class::subsref().
|
inline |
Definition at line 391 of file oct-map.h.
Referenced by octave::ft_manager::do_get_system_fonts(), Fdbstatus(), Fdbstop(), permute_to_correct_order1(), and octave::error_system::rethrow_error().
|
inline |
|
inline |
Definition at line 326 of file oct-map.h.
Referenced by octave_class::byte_size(), octave_struct::byte_size(), concat(), and octave_class::reconstruct_parents().
|
inline |
Definition at line 356 of file oct-map.h.
Referenced by octave_class::exemplar_info::compare(), permute_to_correct_order1(), and octave::tree_evaluator::visit_complex_for_command().
|
inline |
|
inline |
Definition at line 432 of file oct-map.h.
Referenced by transpose().
|
inline |
Definition at line 344 of file oct-map.h.
Referenced by octave_class::octave_class(), assign(), cat(), concat(), delete_elements(), extract_scalar(), F__version_info__(), fast_elem_insert(), index(), optimize_dimensions(), orderfields(), permute(), permute_to_correct_order1(), reshape(), resize(), setfield(), squeeze(), and transpose().
|
inline |
Definition at line 389 of file oct-map.h.
Referenced by octave_class::octave_class(), do_dbstack(), F__magick_formats__(), F__version_info__(), octave_struct::fast_elem_extract(), octave_struct::fast_elem_insert(), octave_base_value::scalar_map_value(), octave_struct::subsref(), octave_class::subsref(), octave::file_editor_tab::update_breakpoints_handler(), and octave::error_system::warning_enabled().
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1348 of file oct-map.cc.
References dimensions, error(), nfields(), and xvals.
Referenced by assign(), delete_elements(), and resize().
octave_map octave_map::orderfields | ( | Array< octave_idx_type > & | perm | ) | const |
Definition at line 313 of file oct-map.cc.
References nfields(), retval, Array< T >::xelem(), xkeys, and xvals.
octave_map octave_map::orderfields | ( | const octave_map & | other, |
Array< octave_idx_type > & | perm | ||
) | const |
Definition at line 326 of file oct-map.cc.
References octave_fields::equal_up_to_order(), error(), octave_fields::is_same(), nfields(), retval, Array< T >::xelem(), xkeys, and xvals.
octave_map octave_map::orderfields | ( | void | ) | const |
Definition at line 306 of file oct-map.cc.
Referenced by assign(), and permute_to_correct_order1().
octave_map octave_map::page | ( | octave_idx_type | k | ) | const |
Definition at line 985 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 465 of file oct-map.cc.
References dimensions, Array< T >::dimensions, Array< T >::dims(), nfields(), Array< T >::optimize_dimensions(), Array< T >::permute(), retval, xkeys, and xvals.
Referenced by octave_scalar_struct::permute().
octave_map octave_map::reshape | ( | const dim_vector & | dv | ) | const |
Definition at line 526 of file oct-map.cc.
References dim_vector::chop_trailing_singletons(), dimensions, Array< T >::dimensions, nfields(), Array< T >::optimize_dimensions(), Array< T >::reshape(), retval, xkeys, and xvals.
Referenced by octave_scalar_struct::reshape().
void octave_map::resize | ( | const dim_vector & | dv, |
bool | fill = false |
||
) |
Definition at line 576 of file oct-map.cc.
References dimensions, nfields(), optimize_dimensions(), Array< T >::resize(), and xvals.
Referenced by octave_class::octave_class(), F__version_info__(), octave_struct::resize(), and octave_scalar_struct::resize().
void octave_map::rmfield | ( | const std::string & | key | ) |
Definition at line 298 of file oct-map.cc.
References octave_fields::rmfield(), xkeys, and xvals.
|
inline |
Definition at line 393 of file oct-map.h.
Referenced by octave_struct::edit_display().
|
inline |
Definition at line 324 of file oct-map.h.
Referenced by assign(), concat(), octave_class::dotref(), octave_struct::dotref(), octave_class::find_parent_class(), octave_class::is_instance_of(), octave_struct::subsasgn(), octave_class::subsasgn_common(), and octave_class::unique_parent_class().
void octave_map::setfield | ( | const std::string & | key, |
const Cell & | val | ||
) |
Definition at line 282 of file oct-map.cc.
References dimensions, Array< T >::dims(), error(), octave_fields::getfield(), nfields(), xkeys, and xvals.
Referenced by assign(), F__magick_finfo__(), Faudiodevinfo(), Fcell2struct(), Fdbstatus(), Fstruct(), Fwarning(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
octave_map octave_map::squeeze | ( | void | ) | const |
Definition at line 442 of file oct-map.cc.
References dimensions, Array< T >::dimensions, nfields(), Array< T >::optimize_dimensions(), retval, dim_vector::squeeze(), and xvals.
octave_map octave_map::transpose | ( | void | ) | const |
Definition at line 499 of file oct-map.cc.
References dimensions, Array< T >::dimensions, ndims(), nfields(), Array< T >::optimize_dimensions(), retval, xkeys, and xvals.
Referenced by oct_unop_default(), and oct_unop_transpose().
|
private |
Definition at line 491 of file oct-map.h.
Referenced by octave_map(), assign(), cat(), contents(), delete_elements(), elem(), index(), optimize_dimensions(), permute(), reshape(), resize(), setfield(), squeeze(), and transpose().
|
private |
Definition at line 489 of file oct-map.h.
Referenced by assign(), cat(), contents(), elem(), fast_elem_extract(), fast_elem_insert(), getfield(), index(), orderfields(), permute(), reshape(), rmfield(), setfield(), and transpose().
|
private |
Definition at line 490 of file oct-map.h.
Referenced by octave_map(), assign(), contents(), delete_elements(), do_cat(), extract_scalar(), fast_elem_insert(), getfield(), index(), optimize_dimensions(), orderfields(), permute(), reshape(), resize(), rmfield(), setfield(), squeeze(), and transpose().