#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 | m_dimensions |
octave_fields | m_keys |
std::vector< Cell > | m_vals |
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 m, m_dimensions, and m_vals.
void octave_map::assign | ( | const Array< octave::idx_vector > & | ia, |
const octave_map & | rhs | ||
) |
Definition at line 1088 of file oct-map.cc.
References assign(), error(), error_unless(), octave_fields::is_same(), m_dimensions, m_keys, m_vals, nfields(), optimize_dimensions(), and orderfields().
void octave_map::assign | ( | const octave::idx_vector & | i, |
const octave::idx_vector & | j, | ||
const octave_map & | rhs | ||
) |
Definition at line 1040 of file oct-map.cc.
References assign(), error(), error_unless(), octave_fields::is_same(), m_dimensions, m_keys, m_vals, nfields(), optimize_dimensions(), and orderfields().
void octave_map::assign | ( | const octave::idx_vector & | i, |
const octave_map & | rhs | ||
) |
Definition at line 993 of file oct-map.cc.
References assign(), error(), error_unless(), octave_fields::is_same(), m_dimensions, m_keys, m_vals, nfields(), optimize_dimensions(), and orderfields().
void octave_map::assign | ( | const octave_value_list & | idx, |
const octave_map & | rhs | ||
) |
Definition at line 1136 of file oct-map.cc.
References assign(), and octave_value_list::length().
void octave_map::assign | ( | const octave_value_list & | idx, |
const std::string & | k, | ||
const Cell & | rhs | ||
) |
Definition at line 1190 of file oct-map.cc.
References Cell::assign(), contents(), Array< T, Alloc >::dims(), end(), m_dimensions, m_vals, nfields(), optimize_dimensions(), seek(), and setfield().
|
inline |
Definition at line 365 of file oct-map.h.
Referenced by octave_class::octave_class(), assign(), ft_manager::do_get_system_fonts(), F__ftp_dir__(), F__version_info__(), Fdbstatus(), Fwarning(), profiler::tree_node::get_hierarchical(), symbol_info_list::map_value(), octregexp(), error_system::set_warning_option(), bp_table::stop_on_err_warn_status(), 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 752 of file oct-map.cc.
References dim_vector::concat(), do_cat(), error(), octave_fields::is_same(), m_dimensions, m_keys, n, nfields(), OCTAVE_LOCAL_BUFFER, optimize_dimensions(), and permute_to_correct_order().
|
static |
Definition at line 688 of file oct-map.cc.
References do_cat(), error(), octave_fields::is_same(), m_dimensions, octave_scalar_map::m_keys, m_keys, n, octave_scalar_map::nfields(), OCTAVE_LOCAL_BUFFER, optimize_dimensions(), permute_to_correct_order(), and dim_vector::resize().
Referenced by Fget(), tm_const::map_concat(), 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 error_system::set_warning_option().
|
inline |
octave_map octave_map::column | ( | octave_idx_type | k | ) | const |
Definition at line 977 of file oct-map.cc.
References 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 1319 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.
Referenced by octave_class::reconstruct_parents(), 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 octave_fields::getfield(), m_dimensions, m_keys, and m_vals.
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(), call_stack::backtrace(), octave_class::break_closure_cycles(), octave_struct::break_closure_cycles(), octave_class::byte_size(), octave_struct::byte_size(), concat(), bp_table::dbstop_process_map_args(), error_system::default_warning_state(), 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(), error_system::make_stack_frame_list(), error_system::make_stack_map(), 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(), error_system::set_warning_option(), octave_struct::subsasgn(), octave_class::subsasgn_common(), octave_class::unique_parent_class(), file_editor_tab::update_breakpoints_handler(), tree_evaluator::visit_complex_for_command(), error_system::warning_enabled(), and error_system::warning_query().
|
inline |
|
inline |
void octave_map::delete_elements | ( | const Array< octave::idx_vector > & | ia | ) |
Definition at line 1268 of file oct-map.cc.
References delete_elements(), Array< T, Alloc >::delete_elements(), Array< T, Alloc >::dims(), m_dimensions, m_vals, nfields(), and optimize_dimensions().
void octave_map::delete_elements | ( | const octave::idx_vector & | i | ) |
Definition at line 1228 of file oct-map.cc.
References Array< T, Alloc >::delete_elements(), Array< T, Alloc >::dims(), m_dimensions, m_vals, nfields(), and optimize_dimensions().
Referenced by delete_elements(), do_dbstack(), F__magick_formats__(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::delete_elements | ( | const octave_value_list & | idx | ) |
Definition at line 1288 of file oct-map.cc.
References delete_elements(), and octave_value_list::length().
void octave_map::delete_elements | ( | int | dim, |
const octave::idx_vector & | i | ||
) |
Definition at line 1248 of file oct-map.cc.
References delete_elements(), Array< T, Alloc >::delete_elements(), Array< T, Alloc >::dims(), m_dimensions, m_vals, nfields(), and optimize_dimensions().
|
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 622 of file oct-map.cc.
References m_dimensions, m_vals, n, nfields(), and OCTAVE_LOCAL_BUFFER.
|
staticprivate |
Definition at line 600 of file oct-map.cc.
References error_unless(), m_dimensions, octave_scalar_map::m_vals, m_vals, n, nfields(), and dim_vector::resize().
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(), extract_scalar(), m_dimensions, m_keys, and ra_idx.
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(), extract_scalar(), m_dimensions, and m_keys.
octave_scalar_map octave_map::elem | ( | octave_idx_type | n | ) | const |
Definition at line 370 of file oct-map.cc.
References compute_index(), extract_scalar(), m_dimensions, m_keys, and n.
|
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 octave_scalar_map::m_vals, m_vals, and nfields().
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(), m_keys, and n.
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(), octave_scalar_map::m_keys, m_keys, octave_scalar_map::m_vals, m_vals, n, nfields(), and OCTAVE_LOCAL_BUFFER.
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(), m_keys, and m_vals.
Referenced by contents(), Fdbstop(), and Fset().
octave_map octave_map::index | ( | const Array< octave::idx_vector > & | ia, |
bool | resize_ok = false |
||
) | const |
Definition at line 895 of file oct-map.cc.
References Array< T, Alloc >::dims(), Array< T, Alloc >::index(), m_dimensions, m_keys, m_vals, nfields(), and optimize_dimensions().
octave_map octave_map::index | ( | const octave::idx_vector & | i, |
bool | resize_ok = false |
||
) | const |
Definition at line 846 of file oct-map.cc.
References Array< T, Alloc >::dims(), Array< T, Alloc >::index(), m_dimensions, m_keys, m_vals, nfields(), and optimize_dimensions().
octave_map octave_map::index | ( | const octave::idx_vector & | i, |
const octave::idx_vector & | j, | ||
bool | resize_ok = false |
||
) | const |
Definition at line 870 of file oct-map.cc.
References Array< T, Alloc >::dims(), Array< T, Alloc >::index(), m_dimensions, m_keys, m_vals, nfields(), and optimize_dimensions().
octave_map octave_map::index | ( | const octave_value_list & | idx, |
bool | resize_ok = false |
||
) | const |
Definition at line 919 of file oct-map.cc.
References index(), and octave_value_list::length().
|
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 ft_manager::do_get_system_fonts(), Fdbstatus(), Fdbstop(), permute_to_correct_order1(), and error_system::rethrow_error().
|
inline |
Definition at line 347 of file oct-map.h.
Referenced by bp_table::dbstop_process_map_args(), Fdbstop(), and Fset().
|
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 tree_evaluator::visit_complex_for_command().
|
inline |
|
inline |
Definition at line 344 of file oct-map.h.
Referenced by octave_class::octave_class(), assign(), octave_class::break_closure_cycles(), octave_struct::break_closure_cycles(), cat(), concat(), delete_elements(), do_cat(), 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(), file_editor_tab::update_breakpoints_handler(), and error_system::warning_enabled().
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1347 of file oct-map.cc.
References error(), m_dimensions, m_vals, and nfields().
Referenced by assign(), cat(), delete_elements(), index(), permute(), reshape(), resize(), squeeze(), and transpose().
octave_map octave_map::orderfields | ( | Array< octave_idx_type > & | perm | ) | const |
Definition at line 313 of file oct-map.cc.
References m_keys, m_vals, nfields(), octave_fields::orderfields(), and Array< T, Alloc >::xelem().
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(), m_keys, m_vals, nfields(), and Array< T, Alloc >::xelem().
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 983 of file oct-map.cc.
References index().
octave_map octave_map::permute | ( | const Array< int > & | vec, |
bool | inv = false |
||
) | const |
Definition at line 465 of file oct-map.cc.
References Array< T, Alloc >::dims(), m_dimensions, m_keys, m_vals, nfields(), optimize_dimensions(), and Array< T, Alloc >::permute().
Referenced by octave_scalar_struct::permute().
octave_map octave_map::reshape | ( | const dim_vector & | dv | ) | const |
Definition at line 524 of file oct-map.cc.
References dim_vector::chop_trailing_singletons(), m_dimensions, m_keys, m_vals, nfields(), optimize_dimensions(), and Array< T, Alloc >::reshape().
Referenced by octave_class::reshape(), and octave_scalar_struct::reshape().
void octave_map::resize | ( | const dim_vector & | dv, |
bool | fill = false |
||
) |
Definition at line 574 of file oct-map.cc.
References m_dimensions, m_vals, nfields(), optimize_dimensions(), and Array< T, Alloc >::resize().
Referenced by octave_class::octave_class(), F__version_info__(), octave_struct::resize(), octave_scalar_struct::resize(), and octave_class::resize().
void octave_map::rmfield | ( | const std::string & | key | ) |
Definition at line 298 of file oct-map.cc.
References m_keys, m_vals, and octave_fields::rmfield().
|
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 Array< T, Alloc >::dims(), error(), octave_fields::getfield(), m_dimensions, m_keys, m_vals, and nfields().
Referenced by assign(), F__magick_finfo__(), Faudiodevinfo(), Fcell2struct(), Fdbstatus(), Fstruct(), Fwarning(), cdef_object::map_value(), error_system::rethrow_error(), 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 m_dimensions, m_vals, nfields(), optimize_dimensions(), and dim_vector::squeeze().
octave_map octave_map::transpose | ( | void | ) | const |
Definition at line 499 of file oct-map.cc.
References m_dimensions, m_keys, m_vals, nfields(), and optimize_dimensions().
Referenced by oct_unop_default(), and oct_unop_transpose().
|
private |
Definition at line 492 of file oct-map.h.
Referenced by octave_map(), assign(), cat(), contents(), delete_elements(), do_cat(), elem(), index(), optimize_dimensions(), permute(), reshape(), resize(), setfield(), squeeze(), and transpose().
|
private |
Definition at line 490 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 491 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().