From: Benedikt Weber (weber_at_[hidden])
Date: 2002-09-22 09:16:58
"Gabriel Dos Reis" <gdr_at_[hidden]> wrote in message
> | I don't think you need the size of the fft to be a template parameter.
> | could have a static map<size_t,valarray<size_t> that holds the different
> | bit-reversed indices.
> That would raise another problem: valarray<> doesn't not satisfy the
> constraints put on a std::map<>::mapped_type.
I was not aware of that. However, now that you say it, I remenber the 2
traps of valarray I encountered so far (there might be more): The order of
arguments in the constructor valarray<T>(const T&, size_T) and the
assignment which is undefined if the size of the LHS and the RHS do not
match. The latter would lead to a problem, when assigning a valarray to a
map element, because map creates a default (empty) valarray and then assigns
the new valarray to that. So it would, may be, better to use vector<size_t>
for the bit-reversed indices and not use the notational convenience of
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk