GNU Octave
4.2.1
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 250 of file oct-map.cc.
References dimensions, octave_scalar_map::nfields(), octave_scalar_map::xvals, and xvals.
|
inline |
Definition at line 347 of file oct-map.h.
References setfield.
Referenced by mxArray_struct::as_octave_value(), octave_class::assign(), assign(), F__ftp_dir__(), F__version_info__(), base_properties::get(), root_figure::properties::get(), figure::properties::get(), axes::properties::get(), line::properties::get(), text::properties::get(), image::properties::get(), light::properties::get(), patch::properties::get(), surface::properties::get(), hggroup::properties::get(), uimenu::properties::get(), uicontextmenu::properties::get(), uicontrol::properties::get(), uibuttongroup::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(), 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 965 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 idx_vector & | i, |
const idx_vector & | j, | ||
const octave_map & | rhs | ||
) |
Definition at line 1012 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 Array< idx_vector > & | ia, |
const octave_map & | rhs | ||
) |
Definition at line 1060 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 1108 of file oct-map.cc.
References assign(), e, k, 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 1162 of file oct-map.cc.
References Cell::assign(), contents(), dimensions, Array< T >::dims(), end(), nfields(), optimize_dimensions(), p, seek(), setfield(), tmp, and xvals.
|
inline |
Definition at line 303 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 661 of file oct-map.cc.
References dimensions, do_cat(), error(), octave_fields::is_same(), octave_scalar_map::nfields(), OCTAVE_LOCAL_BUFFER, optimize_dimensions(), permute_to_correct_order(), dim_vector::resize(), retval, octave_scalar_map::xkeys, and xkeys.
Referenced by Fget(), and single_type_concat().
|
static |
Definition at line 725 of file oct-map.cc.
References dim_vector::concat(), dimensions, do_cat(), dv, error(), octave_fields::is_same(), nfields(), OCTAVE_LOCAL_BUFFER, optimize_dimensions(), permute_to_correct_order(), retval, and xkeys.
octave_scalar_map octave_map::checkelem | ( | octave_idx_type | n | ) | const |
Definition at line 358 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), retval, and xkeys.
Referenced by 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 369 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), retval, and xkeys.
octave_scalar_map octave_map::checkelem | ( | const Array< octave_idx_type > & | ra_idx | ) | const |
Definition at line 380 of file oct-map.cc.
References compute_index(), dimensions, extract_scalar(), retval, and xkeys.
|
inline |
Definition at line 376 of file oct-map.h.
Referenced by dmdm_leftdiv_impl(), and dmm_leftdiv_impl().
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 1291 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 332 of file oct-map.h.
References isfield.
Referenced by decode_subscripts(), make_stack_frame_list(), octave_class::reconstruct_parents(), rethrow_error(), and octave_class::subsasgn_common().
|
inline |
Definition at line 313 of file oct-map.h.
Referenced by octave_struct::as_mxArray(), assign(), octave_struct::byte_size(), octave_class::byte_size(), concat(), bp_table::dbstop_process_map_args(), decode_subscripts(), octave_call_stack::do_backtrace(), octave_struct::dotref(), octave_class::dotref(), file_editor_tab::exit_debug_and_clear(), octave_class::find_parent_class(), cdef_object_scalar::get(), file_editor::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_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::tree_evaluator::visit_complex_for_command(), and warning_enabled().
|
inline |
|
inline |
Cell octave_map::contents | ( | const std::string & | k | ) | const |
Definition at line 334 of file oct-map.cc.
References getfield().
Cell & octave_map::contents | ( | const std::string & | k | ) |
Definition at line 340 of file oct-map.cc.
References dimensions, octave_fields::getfield(), xkeys, and xvals.
|
inline |
void octave_map::delete_elements | ( | const idx_vector & | i | ) |
Definition at line 1200 of file oct-map.cc.
References Array< T >::delete_elements(), dimensions, Array< T >::dims(), 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 1220 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 Array< idx_vector > & | ia | ) |
Definition at line 1240 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 1260 of file oct-map.cc.
References delete_elements(), e, octave_value_list::length(), and octave::index_exception::set_pos_if_unset().
|
inline |
Definition at line 399 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 573 of file oct-map.cc.
References dimensions, nfields(), dim_vector::resize(), octave_scalar_map::xvals, and xvals.
Referenced by cat().
|
staticprivate |
Definition at line 595 of file oct-map.cc.
References dimensions, nfields(), OCTAVE_LOCAL_BUFFER, and xvals.
|
inline |
Definition at line 304 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 349 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 391 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 401 of file oct-map.cc.
References octave_fields::equal_up_to_order(), 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 335 of file oct-map.h.
Referenced by F__fieldnames__(), 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(), and octave_struct::save_hdf5().
Cell octave_map::getfield | ( | const std::string & | key | ) | const |
Definition at line 263 of file oct-map.cc.
References octave_fields::getfield(), xkeys, and xvals.
Referenced by contents(), and for().
|
inline |
Definition at line 310 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 819 of file oct-map.cc.
References dimensions, Array< T >::dims(), Array< T >::index(), k, nfields(), 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 843 of file oct-map.cc.
References dimensions, Array< T >::dims(), Array< T >::index(), k, nfields(), optimize_dimensions(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const Array< idx_vector > & | ia, |
bool | resize_ok = false |
||
) | const |
Definition at line 868 of file oct-map.cc.
References dimensions, Array< T >::dims(), Array< T >::index(), k, nfields(), optimize_dimensions(), retval, xkeys, and xvals.
octave_map octave_map::index | ( | const octave_value_list & | idx, |
bool | resize_ok = false |
||
) | const |
Definition at line 892 of file oct-map.cc.
References e, index(), k, octave_value_list::length(), retval, and octave::index_exception::set_pos_if_unset().
|
inline |
Definition at line 373 of file oct-map.h.
Referenced by octave_range::is_true(), permute_to_correct_order1(), and rethrow_error().
|
inline |
Definition at line 329 of file oct-map.h.
Referenced by bp_table::dbstop_process_map_args(), Fisfield(), and for().
|
inline |
Definition at line 308 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 338 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 372 of file oct-map.h.
References numel().
Referenced by rethrow_error(), and octave::sys::windows_glob().
|
inline |
Definition at line 401 of file oct-map.h.
Referenced by transpose().
|
inline |
Definition at line 326 of file oct-map.h.
Referenced by assign(), cat(), concat(), decode_subscripts(), delete_elements(), do_cat(), 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 371 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(), 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 288 of file oct-map.h.
References dimensions, xkeys, and xvals.
|
private |
Definition at line 1319 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 294 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 301 of file oct-map.cc.
References nfields(), octave_fields::orderfields(), 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 314 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::page | ( | octave_idx_type | k | ) | const |
Definition at line 956 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 453 of file oct-map.cc.
References dimensions, Array< T >::dims(), nfields(), optimize_dimensions(), 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 514 of file oct-map.cc.
References dimensions, dv, nfields(), optimize_dimensions(), 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 547 of file oct-map.cc.
References dimensions, dv, nfields(), optimize_dimensions(), Array< T >::resize(), and xvals.
Referenced by F__version_info__(), 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 286 of file oct-map.cc.
References octave_fields::rmfield(), xkeys, and xvals.
|
inline |
Definition at line 375 of file oct-map.h.
Referenced by dmdm_div_impl(), mdm_div_impl(), and octave::math::svd< T >::svd().
|
inline |
Definition at line 306 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 270 of file oct-map.cc.
References dimensions, Array< T >::dims(), error(), octave_fields::getfield(), nfields(), val, xkeys, and xvals.
Referenced by assign(), 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 430 of file oct-map.cc.
References dimensions, nfields(), optimize_dimensions(), retval, dim_vector::squeeze(), and xvals.
Referenced by octave_struct::squeeze().
octave_map octave_map::transpose | ( | void | ) | const |
Definition at line 487 of file oct-map.cc.
References dimensions, ndims(), nfields(), optimize_dimensions(), retval, xkeys, and xvals.
Referenced by oct_unop_transpose().
|
private |
Definition at line 460 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 458 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 459 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().