|
Boost : |
From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-10-31 15:04:41
johnds_at_[hidden] wrote:
>
> Would there be any interest in a fast fourier transformation class?
> I've written one that has the following signature:
>
> template<class DOUBLE,
> class COMPLEX = std::complex<DOUBLE>,
> class VECTOR = std::vector<COMPLEX> >
> class fft
> {
> static inline void transform(VECTOR&, bool);
> };
>
> The reason for the class (as distinct from a templated function) is
> to enable default template arguments -
> there's no actual state.
Why do you need default template arguments at all?
Can't you deduce the type of VECTOR when you call transform()?
And then, COMPLEX = typename VECTOR::value_type
And then, DOUBLE = typename COMPLEX::value_type
Would it be possible to recast the interface in terms of
(random access) iterators? That would make transform() a lot more
flexible, because it could operate on sub-ranges (of e.g. a vector)
as well.
Jens Maurer
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk