#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 (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 (error_system &es, octave_idx_type count, octave_idx_type nargout, const octave_value_list &inputlist, octave_value &fcn, 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 2345 of file cellfun.cc.
References idx_vector::colon, dim_vector::first_non_singleton(), max(), n, dim_vector::ndims(), Array< T, Alloc >::numel(), and Array< T, Alloc >::xelem().
Referenced by Fcellslices().
Cell do_mat2cell | ( | const ArrayND & | a, |
const Array< octave_idx_type > * | d, | ||
int | nd | ||
) |
Definition at line 2104 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 2116 of file cellfun.cc.
References dim_vector::alloc(), Array< T, Alloc >::clear(), d, octave_value::dims(), error_unless(), dim_vector::increment_index(), octave_value::index_op(), octave_value::magic_colon_t, mat2cell_mismatch(), max(), octave_value::ndims(), Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER, OCTAVE_LOCAL_BUFFER_INIT, prepare_idx(), ra_idx, and Array< T, Alloc >::xelem().
|
static |
Definition at line 1995 of file cellfun.cc.
References Array< T, Alloc >::clear(), d, error_unless(), mat2cell_mismatch(), OCTAVE_LOCAL_BUFFER, prepare_idx(), and Array< T, Alloc >::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 2052 of file cellfun.cc.
References dim_vector::alloc(), Array< T, Alloc >::clear(), idx_vector::colon, d, error_unless(), dim_vector::increment_index(), mat2cell_mismatch(), max(), Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER, OCTAVE_LOCAL_BUFFER_INIT, prepare_idx(), ra_idx, and Array< T, Alloc >::xelem().
Referenced by do_mat2cell().
|
static |
Definition at line 1731 of file cellfun.cc.
References do_num2cell_elem(), do_num2cell_helper(), Array< T, Alloc >::isempty(), dim_vector::numel(), and Array< T, Alloc >::xelem().
Referenced by Fnum2cell().
|
inlinestatic |
Definition at line 1726 of file cellfun.cc.
|
inlinestatic |
Definition at line 1722 of file cellfun.cc.
Referenced by do_num2cell().
|
static |
Definition at line 1679 of file cellfun.cc.
References Array< T, Alloc >::clear(), error(), max(), dim_vector::ndims(), Array< T, Alloc >::numel(), OCTAVE_LOCAL_BUFFER_INIT, and dim_vector::resize().
Referenced by do_num2cell().
|
static |
Definition at line 1786 of file cellfun.cc.
References error(), get_object_dims(), Array< T, Alloc >::isempty(), dim_vector::numel(), Array< T, Alloc >::resize(), octave_value::single_subsref(), and Array< T, Alloc >::xelem().
Referenced by Fnum2cell().
OCTAVE_EXPORT octave_value_list Farrayfun | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 1174 of file cellfun.cc.
References dim_vector::any_zero(), octave_value::class_name(), error_with_id(), f, symbol_table::find_function(), octave_value::function_value(), get_function_handle(), get_mapper_fun_options(), get_output_list(), octave_value::index_op(), 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(), NDArray, octave_value::numel(), OCTAVE_LOCAL_BUFFER, octave_value::op_asn_eq, print_usage(), octave_value::resize(), octave_value_list::resize(), 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 407 of file cellfun.cc.
References dim_vector::any_zero(), octave_value_list::empty(), error(), f, symbol_table::find_function(), octave_value::function_value(), 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(), NDArray, octave_value::numel(), OCTAVE_LOCAL_BUFFER, octave_value::op_asn_eq, print_usage(), octave_value::resize(), octave_value_list::resize(), valid_identifier(), and octave_value_list::xelem().
OCTAVE_EXPORT octave_value_list Fcellindexmat | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2526 of file cellfun.cc.
References octave_value::index_op(), octave_value(), print_usage(), octave_value_list::slice(), x, and Array< T, Alloc >::xelem().
OCTAVE_EXPORT octave_value_list Fcellslices | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2401 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, Alloc >::numel(), ovl(), print_usage(), x, and Array< T, Alloc >::xelem().
OCTAVE_EXPORT octave_value_list Fmat2cell | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2252 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(), 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 1877 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(), 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 227 of file cellfun.cc.
References error(), symbol_table::find_function(), octave_value::is_undefined(), max(), and strncmpi().
Referenced by Farrayfun(), and Fcellfun().
|
static |
Definition at line 1769 of file cellfun.cc.
References m, n, dim_vector::resize(), and octave_value::size().
Referenced by do_object2cell().
|
static |
Definition at line 71 of file cellfun.cc.
References __get_interpreter__(), octave_scalar_map::assign(), octave_value_list::clear(), feval(), octave_value::is_defined(), error_system::last_error_id(), error_system::last_error_message(), octave_value_list::prepend(), interpreter::recover_from_exception(), and error_system::save_exception().
Referenced by Farrayfun(), and Fcellfun().
|
static |
Definition at line 1951 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 1972 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 128 of file cellfun.cc.
References octave_value_list::cell_value(), octave_value::class_name(), d, octave_value::dims(), Array< T, Alloc >::dims(), Array< T, Alloc >::elem(), error(), octave_value::isempty(), octave_value::islogical(), octave_value::isnumeric(), octave_value::isreal(), octave_value::length(), octave_value::ndims(), dim_vector::ndims(), octave_value::numel(), and Array< T, Alloc >::numel().