On Thursday, June 19, 2014 02:59:45 AM Alex wrote:
> Looking at the code of brfft (in fftw.jl) I find
>
> function brfft(X::StridedArray{$Tc}, d::Integer, region::Integer)
> osize = [size(X)...]
> @assert osize[region] == d>>1 + 1
> osize[region] = d
> # snip ...
>
> which seems to imply that d can always be calculated from size(X,region)?
You're checking that the value of d is consistent, you're not calculating it.
Say osize[region] == 3. d could be either 4 or 5.
--Tim
>
> - Alex.
>
> On Thursday, 19 June 2014 11:32:59 UTC+2, Tim Holy wrote:
> > On Thursday, June 19, 2014 12:27:40 AM Alex wrote:
> > > Actually, it is not really clear to me why `d` AKA `len` is needed at
> >
> > all,
> >
> > > since d = (size(A,dim[1])-1)<<1 appears to be well defined. I am
> >
> > probably
> >
> > > missing something here. Maybe Steven or someone else can clarify this?
> >
> > Doc bug. The A referred to in this statement is the _original real-valued_
> > A.
> > And the formula is wrong. A better way to write the help would be
> >
> > Base.irfft(Afft, d[, dims])
> >
> > Inverse of "rfft()": for a complex array "Afft", gives the
> > corresponding real array "A" whose FFT yields "Afft" in the first half.
> > As for "rfft()", "dims" is an optional subset of dimensions to
> > transform, defaulting to "1:ndims(Afft)".
> >
> > "d" is the length of the transformed real array along the
> > "dims[1]" dimension, which must satisfy "size(Afft,dims[1]) ==
> > floor(d/2)+1". (This parameter cannot be inferred
> > from "size(Afft)" due to the possibility of rounding by the
> > "floor" function here.)