#include "Array-util.h"
Go to the source code of this file.
Defines | |
#define | octave_ops_h 1 |
#define | CONCAT2X(x, y) x ## y |
#define | CONCAT2(x, y) CONCAT2X(x,y) |
#define | CONCAT3X(x, y, z) x ## y ## z |
#define | CONCAT3(x, y, z) CONCAT3X(x,y,z) |
#define | INSTALL_UNOP(op, t, f) |
#define | INSTALL_NCUNOP(op, t, f) |
#define | INSTALL_BINOP(op, t1, t2, f) |
#define | INSTALL_CATOP(t1, t2, f) |
#define | INSTALL_ASSIGNOP(op, t1, t2, f) |
#define | INSTALL_ASSIGNANYOP(op, t1, f) |
#define | INSTALL_ASSIGNCONV(t1, t2, tr) |
#define | INSTALL_CONVOP(t1, t2, f) |
#define | INSTALL_WIDENOP(t1, t2, f) |
#define | CAST_UNOP_ARG(t) t v = dynamic_cast<t> (a) |
#define | CAST_BINOP_ARGS(t1, t2) |
#define | CAST_CONV_ARG(t) t v = dynamic_cast<t> (a) |
#define | ASSIGNOPDECL(name) |
#define | NULLASSIGNOPDECL(name) |
#define | ASSIGNANYOPDECL(name) |
#define | DEFASSIGNOP(name, t1, t2) ASSIGNOPDECL (name) |
#define | DEFASSIGNOP_FN(name, t1, t2, f) |
#define | DEFNULLASSIGNOP_FN(name, t, f) |
#define | DEFNDASSIGNOP_FN(name, t1, t2, e, f) |
#define | DEFNDASSIGNOP_OP(name, t1, t2, f, op) |
#define | DEFNDASSIGNOP_FNOP(name, t1, t2, f, fnop) |
#define | DEFASSIGNANYOP_FN(name, t1, f) |
#define | CONVDECL(name) |
#define | CONVDECLX(name) |
#define | DEFCONV(name, a_dummy, b_dummy) CONVDECL (name) |
#define | DEFCONVFNX(name, tfrom, ovtto, tto, e) |
#define | DEFCONVFNX2(name, tfrom, ovtto, e) |
#define | DEFDBLCONVFN(name, ovtfrom, e) |
#define | DEFFLTCONVFN(name, ovtfrom, e) |
#define | DEFSTRINTCONVFN(name, tto) DEFCONVFNX(name, char_matrix_str, CONCAT2(tto, _matrix), tto, char_) |
#define | DEFSTRDBLCONVFN(name, tfrom) DEFCONVFNX(name, tfrom, matrix, , char_) |
#define | DEFSTRFLTCONVFN(name, tfrom) DEFCONVFNX(name, tfrom, float_matrix, Float, char_) |
#define | DEFCONVFN(name, tfrom, tto) DEFCONVFNX2 (name, tfrom, CONCAT2(tto, _matrix), CONCAT2(tto, _)) |
#define | DEFCONVFN2(name, tfrom, sm, tto) DEFCONVFNX2 (name, CONCAT3(tfrom, _, sm), CONCAT2(tto, _matrix), CONCAT2(tto, _)) |
#define | UNOPDECL(name, a) |
#define | DEFUNOPX(name, t) UNOPDECL (name, , ) |
#define | DEFUNOP(name, t) UNOPDECL (name, a) |
#define | DEFUNOP_OP(name, t, op) |
#define | DEFNDUNOP_OP(name, t, e, op) |
#define | DEFUNOP_FN(name, t, f) |
#define | DEFNDUNOP_FN(name, t, e, f) |
#define | DEFNCUNOP_METHOD(name, t, method) |
#define | BINOPDECL(name, a1, a2) |
#define | DEFBINOPX(name, t1, t2) BINOPDECL (name, , ) |
#define | DEFBINOP(name, t1, t2) BINOPDECL (name, a1, a2) |
#define | DEFBINOP_OP(name, t1, t2, op) |
#define | DEFCMPLXCMPOP_OP(name, t1, t2, op) |
#define | DEFSCALARBOOLOP_OP(name, t1, t2, op) |
#define | DEFNDBINOP_OP(name, t1, t2, e1, e2, op) |
#define | DEFBINOP_FN(name, t1, t2, f) |
#define | DEFNDBINOP_FN(name, t1, t2, e1, e2, f) |
#define | DEFNDCMPLXCMPOP_FN(name, t1, t2, e1, e2, f) |
#define | BINOP_NONCONFORMANT(msg) |
#define | CATOPDECL(name, a1, a2) |
#define | DEFCATOPX(name, t1, t2) CATOPDECL (name, , ) |
#define | DEFCATOP(name, t1, t2) CATOPDECL (name, a1, a2) |
#define | DEFCATOP_FN(name, t1, t2, f) |
#define | DEFNDCATOP_FN(name, t1, t2, e1, e2, f) |
#define | DEFNDCHARCATOP_FN(name, t1, t2, f) |
#define | DEFNDCATOP_FN2(name, t1, t2, tc1, tc2, e1, e2, f) |
#define | CATOP_NONCONFORMANT(msg) |
Functions | |
void | install_ops (void) |
#define ASSIGNANYOPDECL | ( | name | ) |
Value:
static octave_value \ CONCAT2(oct_assignop_, name) (octave_base_value& a1, \ const octave_value_list& idx, \ const octave_value& a2)
#define ASSIGNOPDECL | ( | name | ) |
Value:
static octave_value \ CONCAT2(oct_assignop_, name) (octave_base_value& a1, \ const octave_value_list& idx, \ const octave_base_value& a2)
#define BINOP_NONCONFORMANT | ( | msg | ) |
Value:
gripe_nonconformant (msg, \ a1.rows (), a1.columns (), \ a2.rows (), a2.columns ()); \ return octave_value ()
Value:
static octave_value \ CONCAT2(oct_binop_, name) (const octave_base_value& a1, const octave_base_value& a2)
#define CAST_BINOP_ARGS | ( | t1, | |||
t2 | ) |
#define CAST_CONV_ARG | ( | t | ) | t v = dynamic_cast<t> (a) |
#define CAST_UNOP_ARG | ( | t | ) | t v = dynamic_cast<t> (a) |
#define CATOP_NONCONFORMANT | ( | msg | ) |
Value:
gripe_nonconformant (msg, \ a1.rows (), a1.columns (), \ a2.rows (), a2.columns ()); \ return octave_value ()
Value:
static octave_value \ CONCAT2(oct_catop_, name) (octave_base_value& a1, const octave_base_value& a2, \ const Array<octave_idx_type>& ra_idx)
#define CONCAT2 | ( | x, | |||
y | ) | CONCAT2X(x,y) |
#define CONCAT2X | ( | x, | |||
y | ) | x ## y |
#define CONCAT3 | ( | x, | |||
y, | |||||
z | ) | CONCAT3X(x,y,z) |
#define CONCAT3X | ( | x, | |||
y, | |||||
z | ) | x ## y ## z |
#define CONVDECL | ( | name | ) |
Value:
static octave_base_value * \ CONCAT2(oct_conv_, name) (const octave_base_value& a)
#define CONVDECLX | ( | name | ) |
Value:
static octave_base_value * \ CONCAT2(oct_conv_, name) (const octave_base_value&)
#define DEFASSIGNANYOP_FN | ( | name, | |||
t1, | |||||
f | ) |
Value:
ASSIGNOPDECL (name) \ { \ CAST_BINOP_ARGS (CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ \ v1.f (idx, v2.CONCAT2(t1, _value) ()); \ return octave_value (); \ }
Value:
BINOPDECL (name, a1, a2) \ { \ CAST_BINOP_ARGS (const CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ gripe_warn_complex_cmp (); \ return octave_value \ (v1.CONCAT2(t1, _value) () op v2.CONCAT2(t2, _value) ()); \ }
#define DEFCONVFN | ( | name, | |||
tfrom, | |||||
tto | ) | DEFCONVFNX2 (name, tfrom, CONCAT2(tto, _matrix), CONCAT2(tto, _)) |
#define DEFCONVFN2 | ( | name, | |||
tfrom, | |||||
sm, | |||||
tto | ) | DEFCONVFNX2 (name, CONCAT3(tfrom, _, sm), CONCAT2(tto, _matrix), CONCAT2(tto, _)) |
Value:
CONVDECL (name) \ { \ CAST_CONV_ARG (const CONCAT2(octave_, ovtfrom)&); \ \ return new octave_matrix (NDArray (v.CONCAT2(e, _value) ())); \ }
Value:
CONVDECL (name) \ { \ CAST_CONV_ARG (const CONCAT2(octave_, ovtfrom)&); \ \ return new octave_float_matrix (FloatNDArray (v.CONCAT2(e, _value) ())); \ }
Value:
static void \ CONCAT2(oct_unop_, name) (octave_base_value& a) \ { \ CAST_UNOP_ARG (CONCAT2(octave_, t)&); \ v.method (); \ }
Value:
ASSIGNOPDECL (name) \ { \ CAST_BINOP_ARGS (CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ \ v1.f (idx, v2.CONCAT2(e, _value) ()); \ return octave_value (); \ }
Value:
ASSIGNOPDECL (name) \ { \ CAST_BINOP_ARGS (CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ \ assert (idx.empty ()); \ fnop (v1.matrix_ref (), v2.CONCAT2(f, _value) ()); \ \ return octave_value (); \ }
Value:
ASSIGNOPDECL (name) \ { \ CAST_BINOP_ARGS (CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ \ assert (idx.empty ()); \ v1.matrix_ref () op v2.CONCAT2(f, _value) (); \ \ return octave_value (); \ }
Value:
UNOPDECL (name, a) \ { \ CAST_UNOP_ARG (const CONCAT2(octave_, t)&); \ return octave_value (f (v.CONCAT2(e, _value) ())); \ }
Value:
UNOPDECL (name, a) \ { \ CAST_UNOP_ARG (const CONCAT2(octave_, t)&); \ return octave_value (op v.CONCAT2(e, _value) ()); \ }
#define DEFNULLASSIGNOP_FN | ( | name, | |||
t, | |||||
f | ) |
Value:
NULLASSIGNOPDECL (name) \ { \ CAST_UNOP_ARG (CONCAT2(octave_, t)&); \ \ v.f (idx); \ return octave_value (); \ }
Value:
BINOPDECL (name, a1, a2) \ { \ CAST_BINOP_ARGS (const CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \ if (xisnan (v1.CONCAT2(t1, _value) ()) || xisnan (v2.CONCAT2(t2, _value) ())) \ { \ error ("invalid conversion from NaN to logical"); \ return octave_value (); \ } \ else \ return octave_value \ (v1.CONCAT2(t1, _value) () op v2.CONCAT2(t2, _value) ()); \ }
#define DEFSTRFLTCONVFN | ( | name, | |||
tfrom | ) | DEFCONVFNX(name, tfrom, float_matrix, Float, char_) |
#define DEFSTRINTCONVFN | ( | name, | |||
tto | ) | DEFCONVFNX(name, char_matrix_str, CONCAT2(tto, _matrix), tto, char_) |
#define DEFUNOP_FN | ( | name, | |||
t, | |||||
f | ) |
Value:
UNOPDECL (name, a) \ { \ CAST_UNOP_ARG (const CONCAT2(octave_, t)&); \ return octave_value (f (v.CONCAT2(t, _value) ())); \ }
Value:
UNOPDECL (name, a) \ { \ CAST_UNOP_ARG (const CONCAT2(octave_, t)&); \ return octave_value (op v.CONCAT2(t, _value) ()); \ }
#define INSTALL_ASSIGNANYOP | ( | op, | |||
t1, | |||||
f | ) |
Value:
octave_value_typeinfo::register_assignany_op \ (octave_value::op, t1::static_type_id (), CONCAT2(oct_assignop_, f));
#define INSTALL_ASSIGNCONV | ( | t1, | |||
t2, | |||||
tr | ) |
Value:
octave_value_typeinfo::register_pref_assign_conv \ (t1::static_type_id (), t2::static_type_id (), tr::static_type_id ());
Value:
octave_value_typeinfo::register_assign_op \ (octave_value::op, t1::static_type_id (), t2::static_type_id (), \ CONCAT2(oct_assignop_, f));
Value:
octave_value_typeinfo::register_binary_op \ (octave_value::op, t1::static_type_id (), t2::static_type_id (), \ CONCAT2(oct_binop_, f));
#define INSTALL_CATOP | ( | t1, | |||
t2, | |||||
f | ) |
Value:
octave_value_typeinfo::register_cat_op \ (t1::static_type_id (), t2::static_type_id (), CONCAT2(oct_catop_, f));
#define INSTALL_CONVOP | ( | t1, | |||
t2, | |||||
f | ) |
Value:
octave_value_typeinfo::register_type_conv_op \ (t1::static_type_id (), t2::static_type_id (), CONCAT2(oct_conv_, f));
#define INSTALL_NCUNOP | ( | op, | |||
t, | |||||
f | ) |
Value:
octave_value_typeinfo::register_non_const_unary_op \ (octave_value::op, t::static_type_id (), CONCAT2(oct_unop_, f));
#define INSTALL_UNOP | ( | op, | |||
t, | |||||
f | ) |
Value:
octave_value_typeinfo::register_unary_op \ (octave_value::op, t::static_type_id (), CONCAT2(oct_unop_, f));
#define INSTALL_WIDENOP | ( | t1, | |||
t2, | |||||
f | ) |
Value:
octave_value_typeinfo::register_widening_op \ (t1::static_type_id (), t2::static_type_id (), CONCAT2(oct_conv_, f));
#define NULLASSIGNOPDECL | ( | name | ) |
Value:
static octave_value \ CONCAT2(oct_assignop_, name) (octave_base_value& a, \ const octave_value_list& idx, \ const octave_base_value&)
#define octave_ops_h 1 |
#define UNOPDECL | ( | name, | |||
a | ) |
Value:
static octave_value \ CONCAT2(oct_unop_, name) (const octave_base_value& a)
void install_ops | ( | void | ) |