GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
cellfun.cc File Reference
#include <string>
#include <vector>
#include <list>
#include <memory>
#include "caseless-str.h"
#include "lo-mappers.h"
#include "oct-locbuf.h"
#include "Cell.h"
#include "oct-map.h"
#include "defun.h"
#include "parse.h"
#include "variables.h"
#include "ov-colon.h"
#include "unwind-prot.h"
#include "gripes.h"
#include "utils.h"
#include "ov-class.h"
#include "ov-scalar.h"
#include "ov-float.h"
#include "ov-complex.h"
#include "ov-flt-complex.h"
#include "ov-bool.h"
#include "ov-int8.h"
#include "ov-int16.h"
#include "ov-int32.h"
#include "ov-int64.h"
#include "ov-uint8.h"
#include "ov-uint16.h"
#include "ov-uint32.h"
#include "ov-uint64.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<class 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<class 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<class Array2D >
static Cell do_mat2cell_2d (const Array2D &a, const Array< octave_idx_type > *d, int nd)
 
template<class ArrayND >
Cell do_mat2cell_nd (const ArrayND &a, const Array< octave_idx_type > *d, int nd)
 
template<class NDA >
static Cell do_num2cell (const NDA &array, const Array< int > &dimv)
 
template<class NDA >
static NDA::element_type do_num2cell_elem (const NDA &array, octave_idx_type i)
 
static Cell do_num2cell_elem (const Cell &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 (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fcellfun (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 (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_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<class 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

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

Referenced by Fmat2cell().

Function Documentation

template<class 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
template<class ArrayND >
Cell do_mat2cell ( const ArrayND &  a,
const Array< octave_idx_type > *  d,
int  nd 
)

Definition at line 2134 of file cellfun.cc.

References do_mat2cell_2d(), and do_mat2cell_nd().

Referenced by Fmat2cell().

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

Definition at line 2025 of file cellfun.cc.

References d, Array< T >::length(), mat2cell_mismatch(), OCTAVE_LOCAL_BUFFER, and prepare_idx().

Referenced by do_mat2cell(), and Fmat2cell().

template<class ArrayND >
Cell do_mat2cell_nd ( const ArrayND &  a,
const Array< octave_idx_type > *  d,
int  nd 
)
template<class NDA >
static Cell do_num2cell ( const NDA &  array,
const Array< int > &  dimv 
)
static
template<class NDA >
static NDA::element_type do_num2cell_elem ( const NDA &  array,
octave_idx_type  i 
)
inlinestatic

Definition at line 1760 of file cellfun.cc.

Referenced by do_num2cell().

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

Definition at line 1764 of file cellfun.cc.

static void do_num2cell_helper ( const dim_vector dv,
const Array< int > &  dimv,
dim_vector celldv,
dim_vector arraydv,
Array< int > &  perm 
)
static
static Cell do_object2cell ( const octave_value obj,
const Array< int > &  dimv 
)
static
OCTAVE_EXPORT octave_value_list Farrayfun ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fcellfun ( 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 ( const octave_value_list args,
int nargin,
bool uniform_output,
octave_value error_handler 
)
static
static dim_vector get_object_dims ( octave_value obj)
static

Definition at line 1810 of file cellfun.cc.

References Array< T >::numel(), dim_vector::resize(), and octave_value::size().

Referenced by do_object2cell().

static octave_value_list get_output_list ( octave_idx_type  count,
octave_idx_type  nargout,
const octave_value_list inputlist,
octave_value func,
octave_value error_handler 
)
static
static bool mat2cell_mismatch ( const dim_vector dv,
const Array< octave_idx_type > *  d,
int  nd 
)
static

Definition at line 1978 of file cellfun.cc.

References error(), Array< T >::length(), and dim_vector::length().

Referenced by do_mat2cell(), do_mat2cell_2d(), and do_mat2cell_nd().

template<class container >
static void prepare_idx ( container *  idx,
int  idim,
int  nd,
const Array< octave_idx_type > *  d 
)
static

Definition at line 2002 of file cellfun.cc.

References idx_vector::colon, and Array< T >::numel().

Referenced by do_mat2cell(), do_mat2cell_2d(), and do_mat2cell_nd().

template<typename BNDA , typename NDA >
static octave_value_list try_cellfun_internal_ops ( const octave_value_list args,
int  nargin 
)
static