#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 263 of file oct-map.cc.
References dimensions, i, octave_scalar_map::nfields(), octave_scalar_map::xvals, and xvals.
|
inline |
Definition at line 351 of file oct-map.h.
References k, setfield, and val.
Referenced by mxArray_struct::as_octave_value(), octave_class::assign(), assign(), F__ftp_dir__(), F__version_info__(), octave::profiler::get_flat(), octave_class::load_ascii(), octave_class::load_binary(), octave_class::load_hdf5(), make_idx_args(), symbol_info_list::map_value(), octave_class::octave_class(), octregexp(), cdef_object_scalar::put(), 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 995 of file oct-map.cc.
References assign(), dimensions, e, error(), i, octave_fields::is_same(), k, nfields(), optimize_dimensions(), orderfields(), tmp, xkeys, and xvals.
void octave_map::assign | ( | const idx_vector & | i, |
const idx_vector & | j, | ||
const octave_map & | rhs | ||
) |
Definition at line 1042 of file oct-map.cc.
References assign(), dimensions, e, error(), i, octave_fields::is_same(), k, nfields(), optimize_dimensions(), orderfields(), tmp, xkeys, and xvals.
void octave_map::assign | ( | const Array< idx_vector > & | ia, |
const octave_map & | rhs | ||
) |
Definition at line 1090 of file oct-map.cc.
References assign(), dimensions, e, error(), octave_fields::is_same(), k, nfields(), optimize_dimensions(), orderfields(), tmp, xkeys, and xvals.
void octave_map::assign | ( | const octave_value_list & | idx, |
const octave_map & | rhs | ||
) |
Definition at line 1138 of file oct-map.cc.
References assign(), e, i, k, and octave_value_list::length().
void octave_map::assign | ( | const octave_value_list & | idx, |
const std::string & | k, | ||
const Cell & | rhs | ||
) |
Definition at line 1192 of file oct-map.cc.
References Cell::assign(), contents(), dimensions, Array< T >::dims(), end(), i, k, nfields(), optimize_dimensions(), p, seek(), setfield(), tmp, and xvals.
|
inline |
Definition at line 307 of file oct-map.h.
Referenced by octave_struct::byte_size(), octave_class::byte_size(), octave::fcn_info::fcn_info_rep::clear_map(), concat(), octave_class::reconstruct_parents(), octave_class::save_ascii(), octave_class::save_binary(), octave_class::save_hdf5(), and save_mat5_element_length().
|
static |
Definition at line 691 of file oct-map.cc.
References do_cat(), error(), i, octave_fields::is_same(), octave_scalar_map::nfields(), OCTAVE_LOCAL_BUFFER, permute_to_correct_order(), dim_vector::resize(), retval, octave_scalar_map::xkeys, and xkeys.
Referenced by Fget(), and octave::single_type_concat().
|
static |
Definition at line 755 of file oct-map.cc.
References dim_vector::concat(), dimensions, do_cat(), dv, error(), i, octave_fields::is_same(), nfields(), OCTAVE_LOCAL_BUFFER, permute_to_correct_order(), retval, and xkeys.
|
inline |
Definition at line 385 of file oct-map.h.
References elem.
Referenced by octave_struct::fast_elem_extract(), and octave_struct::try_narrowing_conversion().
|
inline |
|
inline |
|
inline |
octave_map octave_map::column | ( | octave_idx_type | k | ) | const |
Definition at line 980 of file oct-map.cc.
References idx_vector::colon, index(), and k.
|
inline |
Definition at line 381 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 1321 of file oct-map.cc.
References dim_vector::all_zero(), begin(), contents(), dims(), dv, end(), error(), Cell::insert(), key(), nfields(), ra_idx, and seek().
|
inline |
Definition at line 336 of file oct-map.h.
Referenced by decode_subscripts(), make_stack_frame_list(), octave_class::reconstruct_parents(), rethrow_error(), and octave_class::subsasgn_common().
|
inline |
Definition at line 317 of file oct-map.h.
References p.
Referenced by octave_struct::as_mxArray(), assign(), octave_struct::byte_size(), octave_class::byte_size(), concat(), octave::bp_table::dbstop_process_map_args(), decode_subscripts(), octave_struct::dotref(), octave_class::dotref(), octave_struct::edit_display(), octave::vector_struct_model::edit_display(), octave::file_editor_tab::exit_debug_and_clear(), octave_class::find_parent_class(), cdef_object_scalar::get(), octave::main_window::handle_edit_mfile_request(), octave_class::is_instance_of(), make_stack_frame_list(), octave_struct::print_raw(), read_mat5_binary_element(), octave_class::reconstruct_parents(), octave::vector_struct_model::requires_sub_editor(), 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(), octave::vector_struct_model::value_at(), octave::tree_evaluator::visit_complex_for_command(), and warning_enabled().
|
inline |
|
inline |
Cell octave_map::contents | ( | const std::string & | k | ) | const |
Definition at line 347 of file oct-map.cc.
References getfield(), and k.
Cell & octave_map::contents | ( | const std::string & | k | ) |
Definition at line 353 of file oct-map.cc.
References dimensions, octave_fields::getfield(), k, xkeys, and xvals.
|
inline |
void octave_map::delete_elements | ( | const idx_vector & | i | ) |
Definition at line 1230 of file oct-map.cc.
References Array< T >::delete_elements(), dimensions, Array< T >::dims(), i, k, nfields(), optimize_dimensions(), and xvals.
Referenced by delete_elements(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::delete_elements | ( | int | dim, |
const idx_vector & | i | ||
) |
Definition at line 1250 of file oct-map.cc.
References delete_elements(), Array< T >::delete_elements(), dimensions, Array< T >::dims(), i, k, nfields(), optimize_dimensions(), and xvals.
void octave_map::delete_elements | ( | const Array< idx_vector > & | ia | ) |
Definition at line 1270 of file oct-map.cc.
References delete_elements(), Array< T >::delete_elements(), dimensions, Array< T >::dims(), k, nfields(), optimize_dimensions(), and xvals.
void octave_map::delete_elements | ( | const octave_value_list & | idx | ) |
Definition at line 1290 of file oct-map.cc.
References delete_elements(), e, i, and octave_value_list::length().
|
inline |
Definition at line 416 of file oct-map.h.
Referenced by concat(), octave_struct::dims(), octave_class::dims(), octave_class::octave_class(), and permute_to_correct_order1().
|
staticprivate |
Definition at line 603 of file oct-map.cc.
References i, octave_value::nfields(), octave_value::numel(), dim_vector::resize(), retval, and octave_scalar_map::xvals.
Referenced by cat().
|
staticprivate |
Definition at line 625 of file oct-map.cc.
References octave_value::dims(), i, octave_value::nfields(), OCTAVE_LOCAL_BUFFER, retval, and xvals.
octave_scalar_map octave_map::elem | ( | octave_idx_type | n | ) | const |
Definition at line 371 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), retval, and xkeys.
octave_scalar_map octave_map::elem | ( | octave_idx_type | i, |
octave_idx_type | j | ||
) | const |
Definition at line 382 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), i, retval, and xkeys.
octave_scalar_map octave_map::elem | ( | const Array< octave_idx_type > & | ra_idx | ) | const |
Definition at line 393 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), ra_idx, retval, and xkeys.
|
inline |
Definition at line 308 of file oct-map.h.
Referenced by assign(), octave_struct::byte_size(), octave_class::byte_size(), octave::fcn_info::fcn_info_rep::clear_map(), concat(), octave_struct::dotref(), octave_class::dotref(), octave_class::reconstruct_parents(), octave_class::save_ascii(), octave_class::save_binary(), octave_class::save_hdf5(), save_mat5_element_length(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
|
private |
Definition at line 362 of file oct-map.cc.
References i, 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 404 of file oct-map.cc.
References extract_scalar(), retval, and xkeys.
bool octave_map::fast_elem_insert | ( | octave_idx_type | n, |
const octave_scalar_map & | rhs | ||
) |
Definition at line 414 of file oct-map.cc.
References octave_fields::equal_up_to_order(), i, octave_fields::is_same(), nfields(), OCTAVE_LOCAL_BUFFER, retval, octave_scalar_map::xkeys, xkeys, octave_scalar_map::xvals, and xvals.
Referenced by octave_struct::fast_elem_insert().
|
inline |
Definition at line 339 of file oct-map.h.
Referenced by F__fieldnames__(), octave::vector_struct_model::header_data(), octave_struct::map_keys(), octave_scalar_struct::map_keys(), octave_struct::print_raw(), octave_struct::save_ascii(), octave_scalar_struct::save_ascii(), octave_struct::save_binary(), octave_scalar_struct::save_binary(), octave_struct::save_hdf5(), and octave::vector_struct_model::subscript_expression().
Cell octave_map::getfield | ( | const std::string & | key | ) | const |
Definition at line 276 of file oct-map.cc.
References octave_fields::getfield(), k, xkeys, and xvals.
Referenced by contents(), and G__eigs__().
|
inline |
Definition at line 314 of file oct-map.h.
References p.
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 849 of file oct-map.cc.
References dimensions, Array< T >::dims(), octave_value::dims(), i, Array< T >::index(), k, nfields(), 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 873 of file oct-map.cc.
References dimensions, Array< T >::dims(), octave_value::dims(), i, Array< T >::index(), k, nfields(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const Array< idx_vector > & | ia, |
bool | resize_ok = false |
||
) | const |
Definition at line 898 of file oct-map.cc.
References dimensions, Array< T >::dims(), octave_value::dims(), Array< T >::index(), k, nfields(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const octave_value_list & | idx, |
bool | resize_ok = false |
||
) | const |
Definition at line 922 of file oct-map.cc.
References e, i, index(), k, octave_value_list::length(), and retval.
|
inline |
Definition at line 377 of file oct-map.h.
Referenced by permute_to_correct_order1(), and rethrow_error().
|
inline |
Definition at line 333 of file oct-map.h.
References name.
Referenced by octave::bp_table::dbstop_process_map_args(), and Fisfield().
|
inline |
Definition at line 312 of file oct-map.h.
References p.
Referenced by octave_struct::byte_size(), octave_class::byte_size(), concat(), octave_class::reconstruct_parents(), octave_class::save_ascii(), octave_class::save_binary(), and octave_class::save_hdf5().
|
inline |
Definition at line 342 of file oct-map.h.
References fieldnames.
Referenced by octave_class::exemplar_info::compare(), octave_class::empty_clone(), octave_class::exemplar_info::exemplar_info(), permute_to_correct_order1(), save_mat5_binary_element(), graphics_object::set(), and octave::tree_evaluator::visit_complex_for_command().
|
inline |
Definition at line 376 of file oct-map.h.
References numel().
Referenced by F__version_info__(), and rethrow_error().
|
inline |
Definition at line 418 of file oct-map.h.
Referenced by transpose().
|
inline |
Definition at line 330 of file oct-map.h.
Referenced by assign(), cat(), concat(), decode_subscripts(), delete_elements(), extract_scalar(), F__version_info__(), fast_elem_insert(), index(), octave_struct::nfields(), octave_class::nfields(), octave_scalar_struct::nfields(), 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 375 of file oct-map.h.
Referenced by decode_subscripts(), F__version_info__(), octave_struct::fast_elem_extract(), octave_struct::fast_elem_insert(), octave_struct::numel(), octave_class::octave_class(), octave_user_function::restore_warning_states(), save_mat5_binary_element(), save_mat5_element_length(), 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.
|
private |
Definition at line 1349 of file oct-map.cc.
References dimensions, error(), i, nfields(), and xvals.
Referenced by assign(), delete_elements(), and resize().
octave_map octave_map::orderfields | ( | void | ) | const |
Definition at line 307 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 314 of file oct-map.cc.
References i, 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 327 of file oct-map.cc.
References octave_fields::equal_up_to_order(), error(), i, octave_fields::is_same(), nfields(), retval, Array< T >::xelem(), xkeys, and xvals.
octave_map octave_map::page | ( | octave_idx_type | k | ) | const |
Definition at line 986 of file oct-map.cc.
References idx_vector::colon, index(), and k.
octave_map octave_map::permute | ( | const Array< int > & | vec, |
bool | inv = false |
||
) | const |
Definition at line 466 of file oct-map.cc.
References dimensions, Array< T >::dims(), octave_value::dims(), i, nfields(), Array< T >::permute(), retval, xkeys, and xvals.
Referenced by octave_struct::permute(), and octave_scalar_struct::permute().
octave_map octave_map::reshape | ( | const dim_vector & | dv | ) | const |
Definition at line 527 of file oct-map.cc.
References dimensions, dv, i, nfields(), Array< T >::reshape(), retval, xkeys, and xvals.
Referenced by octave_struct::reshape(), octave_class::reshape(), and octave_scalar_struct::reshape().
void octave_map::resize | ( | const dim_vector & | dv, |
bool | fill = false |
||
) |
Definition at line 577 of file oct-map.cc.
References dimensions, dv, i, nfields(), optimize_dimensions(), Array< T >::resize(), and xvals.
Referenced by F__version_info__(), octave_class::octave_class(), octave_struct::resize(), and octave_scalar_struct::resize().
void octave_map::rmfield | ( | const std::string & | key | ) |
Definition at line 299 of file oct-map.cc.
References k, octave_fields::rmfield(), xkeys, and xvals.
|
inline |
Definition at line 379 of file oct-map.h.
Referenced by octave_struct::edit_display().
|
inline |
Definition at line 310 of file oct-map.h.
References k.
Referenced by assign(), concat(), octave_struct::dotref(), octave_class::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 283 of file oct-map.cc.
References dimensions, error(), octave_fields::getfield(), k, nfields(), val, xkeys, and xvals.
Referenced by assign(), Fcell2struct(), Gaudiodevinfo(), 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 443 of file oct-map.cc.
References dimensions, i, nfields(), retval, dim_vector::squeeze(), and xvals.
Referenced by octave_struct::squeeze().
octave_map octave_map::transpose | ( | void | ) | const |
Definition at line 500 of file oct-map.cc.
References dimensions, i, ndims(), nfields(), retval, xkeys, and xvals.
Referenced by oct_unop_transpose().
|
private |
Definition at line 477 of file oct-map.h.
Referenced by assign(), cat(), contents(), delete_elements(), elem(), index(), octave_map(), operator=(), optimize_dimensions(), permute(), reshape(), resize(), setfield(), squeeze(), and transpose().
|
private |
Definition at line 475 of file oct-map.h.
Referenced by assign(), cat(), contents(), elem(), fast_elem_extract(), fast_elem_insert(), getfield(), index(), operator=(), orderfields(), permute(), reshape(), rmfield(), setfield(), and transpose().
|
private |
Definition at line 476 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().