Mercurial > hg > octave-avbm
changeset 4479:d4d1a0be55f7
[project @ 2003-07-30 20:03:11 by jwe]
author | jwe |
---|---|
date | Wed, 30 Jul 2003 20:03:11 +0000 |
parents | 7afd4bf05aa8 |
children | b96f2c55d5a3 |
files | src/ChangeLog src/data.cc |
diffstat | 2 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2003-07-30 John W. Eaton <jwe@bevo.che.wisc.edu> + * data.cc (make_diag): Use std::abs instead of our own ABS macro. + * utils.cc (identity_matrix): Move here from data.cc. (identity_matrix): Use std::min instead of our own MIN macro.
--- a/src/data.cc +++ b/src/data.cc @@ -42,14 +42,6 @@ #include "oct-obj.h" #include "utils.h" -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef ABS -#define ABS(x) (((x) < 0) ? (-x) : (x)) -#endif - #define ANY_ALL(FCN) \ \ octave_value retval; \ @@ -454,7 +446,7 @@ if (nr == 1) { - int n = nc + ABS (k); + int n = nc + std::abs (k); Matrix m (n, n, 0.0); for (int i = 0; i < nc; i++) m (i+roff, i+coff) = v (0, i); @@ -462,7 +454,7 @@ } else { - int n = nr + ABS (k); + int n = nr + std::abs (k); Matrix m (n, n, 0.0); for (int i = 0; i < nr; i++) m (i+roff, i+coff) = v (i, 0); @@ -496,7 +488,7 @@ if (nr == 1) { - int n = nc + ABS (k); + int n = nc + std::abs (k); ComplexMatrix m (n, n, 0.0); for (int i = 0; i < nc; i++) m (i+roff, i+coff) = v (0, i); @@ -504,7 +496,7 @@ } else { - int n = nr + ABS (k); + int n = nr + std::abs (k); ComplexMatrix m (n, n, 0.0); for (int i = 0; i < nr; i++) m (i+roff, i+coff) = v (i, 0);