#include <string>
#include <vector>
#include <list>
#include <memory>
#include "lo-mappers.h"
#include "oct-locbuf.h"
#include "oct-string.h"
#include "Cell.h"
#include "oct-map.h"
#include "defun.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "parse.h"
#include "variables.h"
#include "unwind-prot.h"
#include "errwarn.h"
#include "utils.h"
#include "ov-bool.h"
#include "ov-class.h"
#include "ov-colon.h"
#include "ov-complex.h"
#include "ov-float.h"
#include "ov-flt-complex.h"
#include "ov-int16.h"
#include "ov-int32.h"
#include "ov-int64.h"
#include "ov-int8.h"
#include "ov-scalar.h"
#include "ov-uint16.h"
#include "ov-uint32.h"
#include "ov-uint64.h"
#include "ov-uint8.h"
#include "ov-fcn-handle.h"
Go to the source code of this file.
Macros | |
#define | BTYP_BRANCH(X, Y) |
Functions | |
template<typename NDA > | |
static Cell | do_cellslices_nda (const NDA &array, const Array< octave_idx_type > &lb, const Array< octave_idx_type > &ub, int dim=-1) |
template<typename ArrayND > | |
Cell | do_mat2cell (const ArrayND &a, const Array< octave_idx_type > *d, int nd) |
Cell | do_mat2cell (octave_value &a, const Array< octave_idx_type > *d, int nd) |
template<typename Array2D > | |
static Cell | do_mat2cell_2d (const Array2D &a, const Array< octave_idx_type > *d, int nd) |
template<typename ArrayND > | |
Cell | do_mat2cell_nd (const ArrayND &a, const Array< octave_idx_type > *d, int nd) |
template<typename NDA > | |
static Cell | do_num2cell (const NDA &array, const Array< int > &dimv) |
static Cell | do_num2cell_elem (const Cell &array, octave_idx_type i) |
template<typename NDA > | |
static NDA::element_type | do_num2cell_elem (const NDA &array, octave_idx_type i) |
static void | do_num2cell_helper (const dim_vector &dv, const Array< int > &dimv, dim_vector &celldv, dim_vector &arraydv, Array< int > &perm) |
static Cell | do_object2cell (const octave_value &obj, const Array< int > &dimv) |
OCTAVE_EXPORT octave_value_list | Farrayfun (octave::interpreter &interp, const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fcellfun (octave::interpreter &interp, const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fcellindexmat (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fcellslices (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fmat2cell (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fnum2cell (const octave_value_list &args, int) |
static void | get_mapper_fun_options (octave::symbol_table &symtab, const octave_value_list &args, int &nargin, bool &uniform_output, octave_value &error_handler) |
static dim_vector | get_object_dims (octave_value &obj) |
static octave_value_list | get_output_list (octave::error_system &es, octave_idx_type count, octave_idx_type nargout, const octave_value_list &inputlist, octave_value &func, octave_value &error_handler) |
static bool | mat2cell_mismatch (const dim_vector &dv, const Array< octave_idx_type > *d, int nd) |
template<typename container > | |
static void | prepare_idx (container *idx, int idim, int nd, const Array< octave_idx_type > *d) |
template<typename BNDA , typename NDA > | |
static octave_value_list | try_cellfun_internal_ops (const octave_value_list &args, int nargin) |
#define BTYP_BRANCH | ( | X, | |
Y | |||
) |
|
static |
Definition at line 2291 of file cellfun.cc.
References idx_vector::colon, dim_vector::first_non_singleton(), max(), n, dim_vector::ndims(), Array< T >::numel(), retval, and Array< T >::xelem().
Referenced by Fcellslices().
Cell do_mat2cell | ( | const ArrayND & | a, |
const Array< octave_idx_type > * | d, | ||
int | nd | ||
) |
Definition at line 2050 of file cellfun.cc.
References d, do_mat2cell_2d(), and do_mat2cell_nd().
Referenced by Fmat2cell().
Cell do_mat2cell | ( | octave_value & | a, |
const Array< octave_idx_type > * | d, | ||
int | nd | ||
) |
Definition at line 2062 of file cellfun.cc.
References dim_vector::alloc(), Array< T >::clear(), d, octave_value::dims(), octave_value::do_index_op(), dim_vector::increment_index(), octave_value::magic_colon_t, mat2cell_mismatch(), max(), octave_value::ndims(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, OCTAVE_LOCAL_BUFFER_INIT, prepare_idx(), ra_idx, retval, and Array< T >::xelem().
|
static |
Definition at line 1941 of file cellfun.cc.
References Array< T >::clear(), d, mat2cell_mismatch(), OCTAVE_LOCAL_BUFFER, prepare_idx(), retval, and Array< T >::xelem().
Referenced by do_mat2cell(), and Fmat2cell().
Cell do_mat2cell_nd | ( | const ArrayND & | a, |
const Array< octave_idx_type > * | d, | ||
int | nd | ||
) |
Definition at line 1998 of file cellfun.cc.
References dim_vector::alloc(), Array< T >::clear(), idx_vector::colon, d, dim_vector::increment_index(), mat2cell_mismatch(), max(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER, OCTAVE_LOCAL_BUFFER_INIT, prepare_idx(), ra_idx, retval, and Array< T >::xelem().
Referenced by do_mat2cell().
|
static |
Definition at line 1677 of file cellfun.cc.
References do_num2cell_elem(), do_num2cell_helper(), Array< T >::isempty(), dim_vector::numel(), retval, and Array< T >::xelem().
Referenced by Fnum2cell().
|
inlinestatic |
Definition at line 1672 of file cellfun.cc.
|
inlinestatic |
Definition at line 1668 of file cellfun.cc.
Referenced by do_num2cell().
|
static |
Definition at line 1625 of file cellfun.cc.
References Array< T >::clear(), error(), max(), dim_vector::ndims(), Array< T >::numel(), OCTAVE_LOCAL_BUFFER_INIT, and dim_vector::resize().
Referenced by do_num2cell().
|
static |
Definition at line 1732 of file cellfun.cc.
References error(), get_object_dims(), Array< T >::isempty(), dim_vector::numel(), Array< T >::resize(), retval, octave_value::single_subsref(), and Array< T >::xelem().
Referenced by Fnum2cell().
OCTAVE_EXPORT octave_value_list Farrayfun | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 1137 of file cellfun.cc.
References dim_vector::any_zero(), octave_value::class_name(), octave_value::do_index_op(), error_with_id(), f, octave::symbol_table::find_function(), octave_value::function_value(), octave::get_function_handle(), get_mapper_fun_options(), get_output_list(), octave_value::is_function(), octave_value::is_function_handle(), octave_value::is_inline_function(), octave_value::is_string(), octave_value::is_undefined(), octave_value_list::length(), name, octave_value::numel(), OCTAVE_LOCAL_BUFFER, octave_value::op_asn_eq, print_usage(), octave_value::resize(), Array< T >::resize(), retval, octave::valid_identifier(), and octave_value_list::xelem().
OCTAVE_EXPORT octave_value_list Fcellfun | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 404 of file cellfun.cc.
References dim_vector::any_zero(), error(), f, octave::symbol_table::find_function(), octave_value::function_value(), octave::get_function_handle(), get_mapper_fun_options(), get_output_list(), octave_value::is_function(), octave_value::is_function_handle(), octave_value::is_inline_function(), octave_value::is_string(), octave_value::is_undefined(), octave_value_list::length(), name, octave_value::numel(), OCTAVE_LOCAL_BUFFER, octave_value::op_asn_eq, print_usage(), octave_value::resize(), Array< T >::resize(), retval, octave::valid_identifier(), and octave_value_list::xelem().
OCTAVE_EXPORT octave_value_list Fcellindexmat | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2472 of file cellfun.cc.
References octave_value::do_index_op(), octave_value(), print_usage(), octave_value_list::slice(), x, and Array< T >::xelem().
OCTAVE_EXPORT octave_value_list Fcellslices | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2347 of file cellfun.cc.
References do_cellslices_nda(), error(), dim_vector::first_non_singleton(), octave_value::magic_colon_t, max(), n, dim_vector::ndims(), Array< T >::numel(), ovl(), print_usage(), x, and Array< T >::xelem().
OCTAVE_EXPORT octave_value_list Fmat2cell | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2198 of file cellfun.cc.
References octave_value::array_value(), BTYP_BRANCH, btyp_complex, btyp_double, btyp_func_handle, octave_value::builtin_type(), octave_value::complex_array_value(), d, do_mat2cell(), do_mat2cell_2d(), err_wrong_type_arg(), error(), octave_value::issparse(), OCTAVE_LOCAL_BUFFER, print_usage(), retval, octave_value::sparse_complex_matrix_value(), and octave_value::sparse_matrix_value().
OCTAVE_EXPORT octave_value_list Fnum2cell | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1823 of file cellfun.cc.
References octave_value::array_value(), octave_value::bool_array_value(), octave_value::cell_value(), octave_value::char_array_value(), octave_value::complex_array_value(), do_num2cell(), do_object2cell(), err_wrong_type_arg(), octave_value::float_array_value(), octave_value::float_complex_array_value(), octave_value::int16_array_value(), octave_value::int32_array_value(), octave_value::int64_array_value(), octave_value::int8_array_value(), octave_value::is_char_matrix(), octave_value::is_int16_type(), octave_value::is_int32_type(), octave_value::is_int64_type(), octave_value::is_int8_type(), octave_value::is_single_type(), octave_value::is_uint16_type(), octave_value::is_uint32_type(), octave_value::is_uint64_type(), octave_value::is_uint8_type(), octave_value::iscell(), octave_value::iscomplex(), octave_value::isinteger(), octave_value::islogical(), octave_value::isnumeric(), octave_value::isobject(), octave_value::isstruct(), octave_value::map_value(), print_usage(), retval, octave_value::uint16_array_value(), octave_value::uint32_array_value(), octave_value::uint64_array_value(), and octave_value::uint8_array_value().
|
static |
Definition at line 226 of file cellfun.cc.
References error(), octave::symbol_table::find_function(), octave_value::is_undefined(), max(), and octave::string::strncmpi().
Referenced by Farrayfun(), and Fcellfun().
|
static |
Definition at line 1715 of file cellfun.cc.
References m, n, Array< T >::resize(), retval, and octave_value::size().
Referenced by do_object2cell().
|
static |
Definition at line 69 of file cellfun.cc.
References octave::__get_interpreter__(), octave_scalar_map::assign(), octave_value_list::clear(), octave::feval(), octave_value::is_defined(), octave::error_system::last_error_id(), octave::error_system::last_error_message(), octave_value_list::prepend(), octave::interpreter::recover_from_exception(), and octave::error_system::save_exception().
Referenced by Farrayfun(), and Fcellfun().
|
static |
Definition at line 1897 of file cellfun.cc.
References d, error(), dim_vector::ndims(), and r.
Referenced by do_mat2cell(), do_mat2cell_2d(), and do_mat2cell_nd().
|
static |
Definition at line 1918 of file cellfun.cc.
References idx_vector::colon, and d.
Referenced by do_mat2cell(), do_mat2cell_2d(), and do_mat2cell_nd().
|
static |
Definition at line 127 of file cellfun.cc.
References octave_value_list::cell_value(), octave_value::class_name(), d, octave_value::dims(), Array< T >::dims(), Array< T >::elem(), error(), octave_value::isempty(), octave_value::islogical(), octave_value::isnumeric(), octave_value::isreal(), octave_value::length(), name, octave_value::ndims(), dim_vector::ndims(), octave_value::numel(), Array< T >::numel(), and retval.