GNU Octave  3.8.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

Referenced by Fmat2cell(), and Frepelems().

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 2125 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 2017 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 1755 of file cellfun.cc.

Referenced by do_num2cell().

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

Definition at line 1759 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 1804 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 1970 of file cellfun.cc.

References error(), dim_vector::length(), and Array< T >::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 1994 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