Mercurial > hg > octave-lyh
diff liboctave/fCNDArray.cc @ 11586:12df7854fa7c
strip trailing whitespace from source files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:24:59 -0500 |
parents | 57632dea2446 |
children | 353c71c76f22 |
line wrap: on
line diff
--- a/liboctave/fCNDArray.cc +++ b/liboctave/fCNDArray.cc @@ -79,7 +79,7 @@ // Need to be careful here about the distance between fft's for (octave_idx_type k = 0; k < nloop; k++) - octave_fftw::fft (in + k * stride * n, out + k * stride * n, + octave_fftw::fft (in + k * stride * n, out + k * stride * n, n, howmany, stride, dist); return retval; @@ -110,7 +110,7 @@ // Need to be careful here about the distance between fft's for (octave_idx_type k = 0; k < nloop; k++) - octave_fftw::ifft (in + k * stride * n, out + k * stride * n, + octave_fftw::ifft (in + k * stride * n, out + k * stride * n, n, howmany, stride, dist); return retval; @@ -316,7 +316,7 @@ FloatComplex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; - howmany = (stride == 1 ? howmany : + howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany)); octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride); octave_idx_type dist = (stride == 1 ? npts : 1); @@ -364,7 +364,7 @@ FloatComplex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; - howmany = (stride == 1 ? howmany : + howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany)); octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride); octave_idx_type dist = (stride == 1 ? npts : 1); @@ -412,7 +412,7 @@ FloatComplex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; - howmany = (stride == 1 ? howmany : + howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany)); octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride); octave_idx_type dist = (stride == 1 ? npts : 1); @@ -459,7 +459,7 @@ FloatComplex *prow = row.fortran_vec (); octave_idx_type howmany = numel () / npts; - howmany = (stride == 1 ? howmany : + howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany)); octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride); octave_idx_type dist = (stride == 1 ? npts : 1); @@ -526,7 +526,7 @@ // Return nonzero if any element of CM has a non-integer real or // imaginary part. Also extract the largest and smallest (real or -// imaginary) values and return them in MAX_VAL and MIN_VAL. +// imaginary) values and return them in MAX_VAL and MIN_VAL. bool FloatComplexNDArray::all_integers (float& max_val, float& min_val) const @@ -539,7 +539,7 @@ float r_val = std::real (val); float i_val = std::imag (val); - + max_val = r_val; min_val = r_val; @@ -764,16 +764,16 @@ FloatComplexNDArray::insert (const NDArray& a, octave_idx_type r, octave_idx_type c) { dim_vector a_dv = a.dims (); - + int n = a_dv.length (); - + if (n == dimensions.length ()) { Array<octave_idx_type> a_ra_idx (dim_vector (a_dv.length (), 1), 0); - + a_ra_idx.elem (0) = r; a_ra_idx.elem (1) = c; - + for (int i = 0; i < n; i++) { if (a_ra_idx (i) < 0 || (a_ra_idx (i) + a_dv (i)) > dimensions (i)) @@ -783,21 +783,21 @@ return *this; } } - + a_ra_idx.elem (0) = 0; a_ra_idx.elem (1) = 0; - + octave_idx_type n_elt = a.numel (); - + // IS make_unique () NECCESSARY HERE?? for (octave_idx_type i = 0; i < n_elt; i++) { Array<octave_idx_type> ra_idx = a_ra_idx; - + ra_idx.elem (0) = a_ra_idx (0) + r; ra_idx.elem (1) = a_ra_idx (1) + c; - + elem (ra_idx) = a.elem (a_ra_idx); increment_index (a_ra_idx, a_dv); @@ -846,7 +846,7 @@ ::increment_index (ra_idx, dimensions, start_dimension); } -octave_idx_type +octave_idx_type FloatComplexNDArray::compute_index (Array<octave_idx_type>& ra_idx, const dim_vector& dimensions) {