Mercurial > hg > octave-shane
changeset 7275:c099705f1aa7
[project @ 2007-12-10 18:54:37 by jwe]
author | jwe |
---|---|
date | Mon, 10 Dec 2007 18:54:37 +0000 |
parents | 44fdc33e5207 |
children | 1e8e64d71e34 |
files | src/ChangeLog src/OPERATORS/op-cm-s.cc src/OPERATORS/op-s-cm.cc |
diffstat | 3 files changed, 9 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2007-12-10 John W. Eaton <jwe@octave.org> + * OPERATORS/op-cm-s.cc: Define function for el_mul with + DEFNDBINOP_OP, not DEFBINOP_OP. + + * OPERATORS/op-s-cm.cc: Define functions for el_and and el_or + operators with DEFNDBINOP_FN. + * oct-hist.cc (default_history_file): Use file_ops::concat. * load-path.cc (dir_info::initialize, dir_info::get_file_list, load_path::do_find_fcn, load_path::do_find_file, genpath,
--- a/src/OPERATORS/op-cm-s.cc +++ b/src/OPERATORS/op-cm-s.cc @@ -80,7 +80,7 @@ DEFNDBINOP_FN (gt, complex_matrix, scalar, complex_array, scalar, mx_el_gt) DEFNDBINOP_FN (ne, complex_matrix, scalar, complex_array, scalar, mx_el_ne) -DEFBINOP_OP (el_mul, complex_matrix, scalar, *) +DEFNDBINOP_OP (el_mul, complex_matrix, scalar, complex_array, scalar, *) DEFBINOP (el_div, complex_matrix, scalar) {
--- a/src/OPERATORS/op-s-cm.cc +++ b/src/OPERATORS/op-s-cm.cc @@ -98,19 +98,8 @@ return octave_value (v2.complex_array_value () / d); } -DEFBINOP (el_and, scalar, complex_matrix) -{ - CAST_BINOP_ARGS (const octave_scalar&, const octave_complex_matrix&); - - return mx_el_and (v1.double_value (), v2.complex_array_value ()); -} - -DEFBINOP (el_or, scalar, complex_matrix) -{ - CAST_BINOP_ARGS (const octave_scalar&, const octave_complex_matrix&); - - return mx_el_or (v1.double_value (), v2.complex_array_value ()); -} +DEFNDBINOP_FN (el_and, scalar, complex_matrix, scalar, complex_array, mx_el_and) +DEFNDBINOP_FN (el_or, scalar, complex_matrix, scalar, complex_array, mx_el_or) DEFNDCATOP_FN (s_cm, scalar, complex_matrix, array, complex_array, concat)