GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
cellfun.cc File Reference
#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"
Include dependency graph for cellfun.cc:

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)
 

Macro Definition Documentation

◆ BTYP_BRANCH

#define BTYP_BRANCH (   X,
 
)
Value:
case btyp_ ## X: \
retval = do_mat2cell (a.Y ## _value (), d, nargin - 1); \
break
Cell do_mat2cell(const ArrayND &a, const Array< octave_idx_type > *d, int nd)
Definition: cellfun.cc:2050
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d

Function Documentation

◆ do_cellslices_nda()

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 
)
static

◆ do_mat2cell() [1/2]

template<typename ArrayND >
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().

◆ do_mat2cell() [2/2]

◆ do_mat2cell_2d()

template<typename Array2D >
static Cell do_mat2cell_2d ( const Array2D &  a,
const Array< octave_idx_type > *  d,
int  nd 
)
static

◆ do_mat2cell_nd()

template<typename ArrayND >
Cell do_mat2cell_nd ( const ArrayND &  a,
const Array< octave_idx_type > *  d,
int  nd 
)

◆ do_num2cell()

template<typename NDA >
static Cell do_num2cell ( const NDA &  array,
const Array< int > &  dimv 
)
static

◆ do_num2cell_elem() [1/2]

static Cell do_num2cell_elem ( const Cell array,
octave_idx_type  i 
)
inlinestatic

Definition at line 1672 of file cellfun.cc.

◆ do_num2cell_elem() [2/2]

template<typename NDA >
static NDA::element_type do_num2cell_elem ( const NDA &  array,
octave_idx_type  i 
)
inlinestatic

Definition at line 1668 of file cellfun.cc.

Referenced by do_num2cell().

◆ do_num2cell_helper()

static void do_num2cell_helper ( const dim_vector dv,
const Array< int > &  dimv,
dim_vector celldv,
dim_vector arraydv,
Array< int > &  perm 
)
static

◆ do_object2cell()

static Cell do_object2cell ( const octave_value obj,
const Array< int > &  dimv 
)
static

◆ Farrayfun()

◆ Fcellfun()

◆ Fcellindexmat()

OCTAVE_EXPORT octave_value_list Fcellindexmat ( const octave_value_list args,
int   
)

◆ Fcellslices()

◆ Fmat2cell()

◆ Fnum2cell()

◆ get_mapper_fun_options()

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

◆ get_object_dims()

static dim_vector get_object_dims ( octave_value obj)
static

Definition at line 1715 of file cellfun.cc.

References m, n, Array< T >::resize(), retval, and octave_value::size().

Referenced by do_object2cell().

◆ get_output_list()

◆ mat2cell_mismatch()

static bool mat2cell_mismatch ( const dim_vector dv,
const Array< octave_idx_type > *  d,
int  nd 
)
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().

◆ prepare_idx()

template<typename container >
static void prepare_idx ( container *  idx,
int  idim,
int  nd,
const Array< octave_idx_type > *  d 
)
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().

◆ try_cellfun_internal_ops()