commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject [math] Package transform revisited
Date Thu, 09 Feb 2012 07:46:30 GMT
Hi,
while working on MATH-732, I've made some amendments to the
FastFourierTransformer API. Basically, I've removed the factory
methods create() and createUnitary() I had previously introduced in
MATH-677. Instead, I introduced an enum {STANDARD, UNITARY}. This
allows the specification of the type of normalization to be applied in
the *static* method transformInPlace. Indeed, I do not like boolean
parameters, plus, they are limited to only two types of
normalizations. If we ever wanted to introduce a third (unlikely)
normalization, that would no longer work. Enums are much easier to
read.
If you like these changes, I propose to do the same for all classes in
package transform. This would mean that I reopen MATH-677 for a brief
period of time. This is probably sub-optimal in a prerelease period,
so it's really your call.
One last change I'm considering would be to introduce an enum
TransformType{FORWARD, INVERSE}, and replace the methods
- transform(double[])
- inverseTransform(double[])
with transform(double[], TransformType).
What do you think?

S├ębastien

PS: thinking about it, maybe I should create a new JIRA ticket
altogether, instead of reopening MATH-677.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message