Mercurial > hg > octave-terminal
changeset 2672:e93b4c32457b
[project @ 1997-02-13 20:34:48 by jwe]
author | jwe |
---|---|
date | Thu, 13 Feb 1997 20:34:48 +0000 |
parents | 69552b5a81ab |
children | 05efa2513472 |
files | src/ChangeLog src/data.cc src/pt-fvc.cc |
diffstat | 3 files changed, 19 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ Thu Feb 13 03:02:08 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * data.cc (map_d_m, map_m_d, map_m_m): Rename from map. + (Fatan2): Use new function names. + + * pt-fvc.cc (apply_mapper_fcn): Use member function map() instead + of friend function. + * gripes.cc (gripe_wrong_type_arg (const char*, const string&)): New function.
--- a/src/data.cc +++ b/src/data.cc @@ -99,7 +99,7 @@ typedef double (*d_dd_fcn) (double, double); static Matrix -map (d_dd_fcn f, double x, const Matrix& y) +map_d_m (d_dd_fcn f, double x, const Matrix& y) { int nr = y.rows (); int nc = y.columns (); @@ -114,7 +114,7 @@ } static Matrix -map (d_dd_fcn f, const Matrix& x, double y) +map_m_d (d_dd_fcn f, const Matrix& x, double y) { int nr = x.rows (); int nc = x.columns (); @@ -129,7 +129,7 @@ } static Matrix -map (d_dd_fcn f, const Matrix& x, const Matrix& y) +map_m_m (d_dd_fcn f, const Matrix& x, const Matrix& y) { int x_nr = x.rows (); int x_nc = x.columns (); @@ -198,7 +198,7 @@ Matrix x = arg_x.matrix_value (); if (! error_state) - retval = map (atan2, y, x); + retval = map_d_m (atan2, y, x); } } else if (x_is_scalar) @@ -210,7 +210,7 @@ double x = arg_x.double_value (); if (! error_state) - retval = map (atan2, y, x); + retval = map_m_d (atan2, y, x); } } else if (y_nr == x_nr && y_nc == x_nc) @@ -222,7 +222,7 @@ Matrix x = arg_x.matrix_value (); if (! error_state) - retval = map (atan2, y, x); + retval = map_m_m (atan2, y, x); } } else
--- a/src/pt-fvc.cc +++ b/src/pt-fvc.cc @@ -708,13 +708,16 @@ || any_element_greater_than (m, m_fcn.upper_limit))) { if (m_fcn.c_c_mapper) - retval = map (m_fcn.c_c_mapper, ComplexMatrix (m)); + { + ComplexMatrix cm (m); + retval = cm.map (m_fcn.c_c_mapper); + } else error ("%s: unable to handle real arguments", m_fcn.name.c_str ()); } else if (m_fcn.d_d_mapper) - retval = map (m_fcn.d_d_mapper, m); + retval = m.map (m_fcn.d_d_mapper); else error ("%s: unable to handle real arguments", m_fcn.name.c_str ()); @@ -742,9 +745,9 @@ return retval; if (m_fcn.d_c_mapper) - retval = map (m_fcn.d_c_mapper, cm); + retval = cm.map (m_fcn.d_c_mapper); else if (m_fcn.c_c_mapper) - retval = map (m_fcn.c_c_mapper, cm); + retval = cm.map (m_fcn.c_c_mapper); else error ("%s: unable to handle complex arguments", m_fcn.name.c_str ());