You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sébastien Brisard <se...@m4x.org> on 2012/01/04 04:55:51 UTC

[math] best location for double[] sample(UnivariateFunction, double, double, int)?

Hi,
In o.a.c.m.transform.FastFourierTransformer, a static method
double[] sample(UnivariateFunction f, double min, double max, int n)
is implemented. Obviously, this method could be useful elsewhere in
CM. I'm wondering where I should move it to?
Options I can think of are
1. org.apache.commons.math.util.MathArrays
2. org.apache.commons.math.util.FunctionUtils  (to be created)
3. your own suggestion

What's your preferred solution?
Sébastien


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


Re: [math] best location for double[] sample(UnivariateFunction, double, double, int)?

Posted by Sébastien Brisard <se...@m4x.org>.
2012/1/4 Gilles Sadowski <gi...@harfang.homelinux.org>:
> Hi.
>
>> > In o.a.c.m.transform.FastFourierTransformer, a static method
>> > double[] sample(UnivariateFunction f, double min, double max, int n)
>> > is implemented. Obviously, this method could be useful elsewhere in
>> > CM. I'm wondering where I should move it to?
>> > Options I can think of are
>> > 1. org.apache.commons.math.util.MathArrays
>> > 2. org.apache.commons.math.util.FunctionUtils  (to be created)
>> > 3. your own suggestion
>>
>> I would propose MathUtils, but if other similar functions arise, maybe a
>> new FunctionUtils would make sense.
>
> There is a "FunctionUtils" class in package "o.a.c.m.analysis".
>
> Regards,
> Gilles
>
Ooops. Missed this one. So I suppose that's where sample() should go.
Thanks,
Sébastien


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


Re: [math] best location for double[] sample(UnivariateFunction, double, double, int)?

Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
Hi.

> > In o.a.c.m.transform.FastFourierTransformer, a static method
> > double[] sample(UnivariateFunction f, double min, double max, int n)
> > is implemented. Obviously, this method could be useful elsewhere in
> > CM. I'm wondering where I should move it to?
> > Options I can think of are
> > 1. org.apache.commons.math.util.MathArrays
> > 2. org.apache.commons.math.util.FunctionUtils  (to be created)
> > 3. your own suggestion
> 
> I would propose MathUtils, but if other similar functions arise, maybe a
> new FunctionUtils would make sense.

There is a "FunctionUtils" class in package "o.a.c.m.analysis".

Regards,
Gilles

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


Re: [math] best location for double[] sample(UnivariateFunction, double, double, int)?

Posted by Luc Maisonobe <Lu...@free.fr>.
Le 04/01/2012 04:55, Sébastien Brisard a écrit :
> Hi,
> In o.a.c.m.transform.FastFourierTransformer, a static method
> double[] sample(UnivariateFunction f, double min, double max, int n)
> is implemented. Obviously, this method could be useful elsewhere in
> CM. I'm wondering where I should move it to?
> Options I can think of are
> 1. org.apache.commons.math.util.MathArrays
> 2. org.apache.commons.math.util.FunctionUtils  (to be created)
> 3. your own suggestion

I would propose MathUtils, but if other similar functions arise, maybe a
new FunctionUtils would make sense.

Luc

> 
> What's your preferred solution?
> Sébastien
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


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