Mercurial > hg > octave-lyh
comparison liboctave/fNDArray.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 |
---|---|
39 #include "lo-ieee.h" | 39 #include "lo-ieee.h" |
40 #include "lo-mappers.h" | 40 #include "lo-mappers.h" |
41 #include "oct-locbuf.h" | 41 #include "oct-locbuf.h" |
42 #include "mx-op-defs.h" | 42 #include "mx-op-defs.h" |
43 | 43 |
44 FloatNDArray::FloatNDArray (const charNDArray& a) | |
45 : MArrayN<float> (a.dims ()) | |
46 { | |
47 octave_idx_type n = a.numel (); | |
48 for (octave_idx_type i = 0; i < n; i++) | |
49 xelem (i) = static_cast<unsigned char> (a(i)); | |
50 } | |
51 | |
44 #if defined (HAVE_FFTW3) | 52 #if defined (HAVE_FFTW3) |
45 #include "oct-fftw.h" | 53 #include "oct-fftw.h" |
46 | 54 |
47 FloatComplexNDArray | 55 FloatComplexNDArray |
48 FloatNDArray::fourier (int dim) const | 56 FloatNDArray::fourier (int dim) const |