Mercurial > octave-dspies
comparison liboctave/dNDArray.cc @ 8956:d91fa4b20bbb
ensure nonnegative char -> real conversion
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 11 Mar 2009 10:31:08 +0100 |
parents | eb63fbe60fab |
children | ed5055b0a476 |
comparison
equal
deleted
inserted
replaced
8955:6d3fcbf89267 | 8956:d91fa4b20bbb |
---|---|
85 for (octave_idx_type i = 0; i < a.numel (); i++) | 85 for (octave_idx_type i = 0; i < a.numel (); i++) |
86 ptmp[i] = static_cast<double> (pa[i]); | 86 ptmp[i] = static_cast<double> (pa[i]); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 NDArray::NDArray (const charNDArray& a) | |
91 : MArrayN<double> (a.dims ()) | |
92 { | |
93 octave_idx_type n = a.numel (); | |
94 for (octave_idx_type i = 0; i < n; i++) | |
95 xelem (i) = static_cast<unsigned char> (a(i)); | |
96 } | |
97 | |
90 #if defined (HAVE_FFTW3) | 98 #if defined (HAVE_FFTW3) |
91 | 99 |
92 ComplexNDArray | 100 ComplexNDArray |
93 NDArray::fourier (int dim) const | 101 NDArray::fourier (int dim) const |
94 { | 102 { |