GNU Octave
4.0.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 245 of file oct-map.cc.
References dimensions, octave_scalar_map::nfields(), octave_scalar_map::xvals, and xvals.
|
inline |
Definition at line 348 of file oct-map.h.
Referenced by mxArray_struct::as_octave_value(), assign(), F__ftp_dir__(), F__version_info__(), F__which__(), Fautoload(), 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(), set_warning_option(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::assign | ( | const idx_vector & | i, |
const octave_map & | rhs | ||
) |
Definition at line 965 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 1007 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 1050 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 1093 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 1141 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 304 of file oct-map.h.
Referenced by octave_struct::byte_size(), octave_class::byte_size(), concat(), 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 662 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 727 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 357 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), and xkeys.
Referenced by octave_struct::fast_elem_extract(), G__magick_formats__(), 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 368 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 379 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), and xkeys.
|
inline |
Definition at line 365 of file oct-map.h.
Referenced by set_warning_option().
|
inline |
octave_map octave_map::column | ( | octave_idx_type | k | ) | const |
Definition at line 950 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 1265 of file oct-map.cc.
References dim_vector::all_zero(), begin(), contents(), dims(), end(), error(), Cell::insert(), key(), nfields(), ra_idx, and seek().
|
inline |
Definition at line 333 of file oct-map.h.
Referenced by decode_subscripts(), Frethrow(), Fwarning(), octave_class::reconstruct_parents(), and octave_class::subsasgn_common().
|
inline |
Definition at line 314 of file oct-map.h.
Referenced by octave_struct::as_mxArray(), assign(), octave_struct::byte_size(), octave_class::byte_size(), concat(), decode_subscripts(), default_warning_state(), display_warning_options(), octave_call_stack::do_backtrace(), do_dbstack(), octave_struct::dotref(), octave_class::dotref(), octave_class::find_parent_class(), Frethrow(), Fstruct2cell(), Fwarning(), octave_class::is_instance_of(), 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(), set_warning_option(), 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 333 of file oct-map.cc.
References getfield().
Cell & octave_map::contents | ( | const std::string & | k | ) |
Definition at line 339 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 1179 of file oct-map.cc.
References Array< T >::delete_elements(), dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), and xvals.
Referenced by delete_elements(), G__magick_formats__(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
void octave_map::delete_elements | ( | int | dim, |
const idx_vector & | i | ||
) |
Definition at line 1199 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 1219 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 1239 of file oct-map.cc.
References delete_elements(), error_state, and octave_value_list::length().
|
inline |
Definition at line 400 of file oct-map.h.
Referenced by concat(), Fstruct2cell(), octave_class::octave_class(), and permute_to_correct_order1().
|
staticprivate |
Definition at line 572 of file oct-map.cc.
References dimensions, nfields(), dim_vector::resize(), octave_scalar_map::xvals, and xvals.
Referenced by cat().
|
staticprivate |
Definition at line 594 of file oct-map.cc.
References dimensions, nfields(), OCTAVE_LOCAL_BUFFER, and xvals.
|
inline |
Definition at line 305 of file oct-map.h.
Referenced by assign(), octave_struct::byte_size(), octave_class::byte_size(), concat(), octave_struct::dotref(), octave_class::dotref(), 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 348 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 390 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 400 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 octave_struct::fast_elem_insert(), G__magick_finfo__(), and G__magick_formats__().
|
inline |
Definition at line 336 of file oct-map.h.
Referenced by F__fieldnames__(), 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 258 of file oct-map.cc.
References octave_fields::getfield(), xkeys, and xvals.
Referenced by contents(), and Fset().
|
inline |
Definition at line 311 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 825 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 849 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 874 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 898 of file oct-map.cc.
References error_state, index(), and octave_value_list::length().
|
inline |
Definition at line 374 of file oct-map.h.
Referenced by permute_to_correct_order1().
|
inline |
Definition at line 330 of file oct-map.h.
Referenced by Fisfield(), Frmfield(), and Fset().
|
inline |
Definition at line 309 of file oct-map.h.
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 339 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 373 of file oct-map.h.
Referenced by F__version_info__(), and Fdbstatus().
|
inline |
Definition at line 402 of file oct-map.h.
Referenced by transpose().
|
inline |
Definition at line 327 of file oct-map.h.
Referenced by assign(), cat(), concat(), decode_subscripts(), delete_elements(), do_cat(), extract_scalar(), F__version_info__(), fast_elem_insert(), Fstruct2cell(), 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 372 of file oct-map.h.
Referenced by decode_subscripts(), do_dbstack(), F__version_info__(), octave_struct::fast_elem_extract(), octave_struct::fast_elem_insert(), Frethrow(), Fstruct2cell(), G__magick_formats__(), octave_class::octave_class(), 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 290 of file oct-map.h.
References dimensions, xkeys, and xvals.
|
private |
Definition at line 1296 of file oct-map.cc.
References dimensions, error(), nfields(), and xvals.
Referenced by assign(), cat(), delete_elements(), index(), permute(), reshape(), resize(), squeeze(), and transpose().
octave_map octave_map::orderfields | ( | void | ) | const |
Definition at line 291 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 298 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 311 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 956 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 452 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 513 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 546 of file oct-map.cc.
References dimensions, nfields(), optimize_dimensions(), Array< T >::resize(), and xvals.
Referenced by F__version_info__(), 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 283 of file oct-map.cc.
References octave_fields::rmfield(), xkeys, and xvals.
Referenced by Frmfield().
|
inline |
|
inline |
Definition at line 307 of file oct-map.h.
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 265 of file oct-map.cc.
References dimensions, Array< T >::dims(), error(), octave_fields::getfield(), nfields(), xkeys, and xvals.
Referenced by assign(), Fcell2struct(), Fstruct(), G__magick_finfo__(), Gaudiodevinfo(), octave_struct::load_ascii(), octave_struct::load_binary(), octave_struct::load_hdf5(), cdef_object::map_value(), octave_struct::subsasgn(), and octave_class::subsasgn_common().
octave_map octave_map::squeeze | ( | void | ) | const |
Definition at line 429 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 486 of file oct-map.cc.
References dimensions, ndims(), nfields(), optimize_dimensions(), xkeys, and xvals.
|
private |
Definition at line 461 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 459 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 460 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().