Navigation

Operators and Keywords

Function List:

C++ API

bsxfun.cc File Reference

#include <string>
#include <vector>
#include <list>
#include "lo-mappers.h"
#include "oct-map.h"
#include "defun-dld.h"
#include "parse.h"
#include "variables.h"
#include "ov-colon.h"
#include "unwind-prot.h"
#include "ov-fcn-handle.h"
Include dependency graph for bsxfun.cc:

Defines

#define REGISTER_OP_HANDLER(OP, BTYP, NDA, FUNOP)   bsxfun_handler_table[OP][BTYP] = bsxfun_forward_op<NDA, FUNOP>
#define REGISTER_REL_HANDLER(REL, BTYP, NDA, FUNREL)   bsxfun_handler_table[REL][BTYP] = bsxfun_forward_rel<NDA, FUNREL>
#define REGISTER_STD_HANDLERS(BTYP, NDA)
#define BSXDEF(T)
#define BSXINIT(T, CLS, EXTRACTOR)
#define BSXLOOP(T, CLS, EXTRACTOR)
#define BSXEND(T)

Typedefs

typedef octave_value(* bsxfun_handler )(const octave_value &, const octave_value &)

Enumerations

enum  bsxfun_builtin_op {
  bsxfun_builtin_plus = 0, bsxfun_builtin_minus, bsxfun_builtin_times, bsxfun_builtin_divide,
  bsxfun_builtin_max, bsxfun_builtin_min, bsxfun_builtin_eq, bsxfun_builtin_ne,
  bsxfun_builtin_lt, bsxfun_builtin_le, bsxfun_builtin_gt, bsxfun_builtin_ge,
  bsxfun_builtin_and, bsxfun_builtin_or, bsxfun_builtin_power, bsxfun_builtin_unknown,
  bsxfun_num_builtin_ops = bsxfun_builtin_unknown
}

Functions

 DEFUN_DLD (bsxfun, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} bsxfun (@var{f}, @var{A}, @var{B})\n\ Apply a binary function @var{f} element-by-element to two matrix arguments\n\ @var{A} and @var{B}. The function @var{f} must be capable of accepting\n\ two column-vector arguments of equal length, or one column vector\n\ argument and a scalar.\n\ \n\ The dimensions of @var{A} and @var{B} must be equal or singleton. The\n\ singleton dimensions of the matrices will be expanded to the same\n\ dimensionality as the other matrix.\n\ @seealso{arrayfun, cellfun}\n\ @end deftypefn")

Variables

const char * bsxfun_builtin_names []
bsxfun_handler bsxfun_handler_table [bsxfun_num_builtin_ops][btyp_num_types]

Define Documentation

#define BSXDEF (   T  ) 
Value:
T result_ ## T; \
                  bool have_ ## T = false;
#define BSXEND (   T  ) 
Value:
(have_ ## T) \
                    retval (0) = result_ ## T;
#define BSXINIT (   T,
  CLS,
  EXTRACTOR 
)
Value:
(result_type == CLS) \
                        { \
                            have_ ## T = true; \
                            result_ ## T = \
                                tmp (0). EXTRACTOR ## _array_value (); \
                            result_ ## T .resize (dvc); \
                        }
#define BSXLOOP (   T,
  CLS,
  EXTRACTOR 
)
Value:
(have_ ## T) \
                          { \
                            if (tmp (0).class_name () != CLS) \
                              { \
                                have_ ## T = false; \
                                C = result_ ## T; \
                                C = do_cat_op (C, tmp (0), ra_idx); \
                              } \
                            else \
                              result_ ## T .insert \
                                (tmp(0). EXTRACTOR ## _array_value (), \
                                ra_idx); \
                          }
#define REGISTER_OP_HANDLER (   OP,
  BTYP,
  NDA,
  FUNOP 
)    bsxfun_handler_table[OP][BTYP] = bsxfun_forward_op<NDA, FUNOP>
#define REGISTER_REL_HANDLER (   REL,
  BTYP,
  NDA,
  FUNREL 
)    bsxfun_handler_table[REL][BTYP] = bsxfun_forward_rel<NDA, FUNREL>
#define REGISTER_STD_HANDLERS (   BTYP,
  NDA 
)
Value:
REGISTER_OP_HANDLER (bsxfun_builtin_plus, BTYP, NDA, bsxfun_add); \
  REGISTER_OP_HANDLER (bsxfun_builtin_minus, BTYP, NDA, bsxfun_sub); \
  REGISTER_OP_HANDLER (bsxfun_builtin_times, BTYP, NDA, bsxfun_mul); \
  REGISTER_OP_HANDLER (bsxfun_builtin_divide, BTYP, NDA, bsxfun_div); \
  REGISTER_OP_HANDLER (bsxfun_builtin_max, BTYP, NDA, bsxfun_max); \
  REGISTER_OP_HANDLER (bsxfun_builtin_min, BTYP, NDA, bsxfun_min); \
  REGISTER_REL_HANDLER (bsxfun_builtin_eq, BTYP, NDA, bsxfun_eq); \
  REGISTER_REL_HANDLER (bsxfun_builtin_ne, BTYP, NDA, bsxfun_ne); \
  REGISTER_REL_HANDLER (bsxfun_builtin_lt, BTYP, NDA, bsxfun_lt); \
  REGISTER_REL_HANDLER (bsxfun_builtin_le, BTYP, NDA, bsxfun_le); \
  REGISTER_REL_HANDLER (bsxfun_builtin_gt, BTYP, NDA, bsxfun_gt); \
  REGISTER_REL_HANDLER (bsxfun_builtin_ge, BTYP, NDA, bsxfun_ge)

Typedef Documentation

typedef octave_value(* bsxfun_handler)(const octave_value &, const octave_value &)

Enumeration Type Documentation

Enumerator:
bsxfun_builtin_plus 
bsxfun_builtin_minus 
bsxfun_builtin_times 
bsxfun_builtin_divide 
bsxfun_builtin_max 
bsxfun_builtin_min 
bsxfun_builtin_eq 
bsxfun_builtin_ne 
bsxfun_builtin_lt 
bsxfun_builtin_le 
bsxfun_builtin_gt 
bsxfun_builtin_ge 
bsxfun_builtin_and 
bsxfun_builtin_or 
bsxfun_builtin_power 
bsxfun_builtin_unknown 
bsxfun_num_builtin_ops 

Function Documentation

DEFUN_DLD ( bsxfun  ,
args   
)

Variable Documentation

const char* bsxfun_builtin_names[]
Initial value:
{
  "plus",
  "minus",
  "times",
  "rdivide",
  "max",
  "min",
  "eq",
  "ne",
  "lt",
  "le",
  "gt",
  "ge",
  "and",
  "or",
  "power"
}
bsxfun_handler bsxfun_handler_table[bsxfun_num_builtin_ops][btyp_num_types]
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines