You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@gmail.com> on 2011/10/03 17:15:55 UTC

[math] break up MathUtils?

I agree with Gilles' recent comment that this class is bloated.  Any ideas on how to break it up?  Now would be a good time to so it.

Phil


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


Re: [math] break up MathUtils?

Posted by Greg Sterijevski <gs...@gmail.com>.
I think Gilles is on the mark here.

+1 For the break up
+1 For organizing along conceptual lines.

-Greg

On Mon, Oct 3, 2011 at 3:59 PM, Gilles Sadowski <
gilles@harfang.homelinux.org> wrote:

> On Mon, Oct 03, 2011 at 05:42:15PM +0200, Mikkel Meyer Andersen wrote:
> > 2011/10/3 Phil Steitz <ph...@gmail.com>:
> > > I agree with Gilles' recent comment that this class is bloated.  Any
> ideas on how to break it up?  Now would be a good time to so it.
> > >
> > > Phil
> > One way would be to divide it into DiscreteUtils (int's and long's)
> > and ContinuousUtils (float's and double's).
>
> I'd rather divide it along conceptual lines. E.g.
>  Arithmetics (for "addAndCheck")
>  Precision (for "equals", "compare")
>  Binomial (for "binomialCoefficient")
>  MathArrays (for "linearCombination", "distance", "safeNorm", ...)
>  Function (for "pow", "cosh", ...) [But maybe those should go in FastMath].
>
>
> Best regards,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [math] break up MathUtils?

Posted by Luc Maisonobe <Lu...@free.fr>.
Le 04/10/2011 08:43, Mikkel Meyer Andersen a écrit :
> 2011/10/3 Gilles Sadowski<gi...@harfang.homelinux.org>:
>> On Mon, Oct 03, 2011 at 05:42:15PM +0200, Mikkel Meyer Andersen wrote:
>>> 2011/10/3 Phil Steitz<ph...@gmail.com>:
>>>> I agree with Gilles' recent comment that this class is bloated.  Any ideas on how to break it up?  Now would be a good time to so it.
>>>>
>>>> Phil
>>> One way would be to divide it into DiscreteUtils (int's and long's)
>>> and ContinuousUtils (float's and double's).
>>
>> I'd rather divide it along conceptual lines. E.g.
>>   Arithmetics (for "addAndCheck")
>>   Precision (for "equals", "compare")
>>   Binomial (for "binomialCoefficient")
>>   MathArrays (for "linearCombination", "distance", "safeNorm", ...)
>>   Function (for "pow", "cosh", ...) [But maybe those should go in FastMath].
>>
>>
>> Best regards,
>> Gilles
> +1, this seems like a good way.

+1, good idea.

Luc

>
> ---------------------------------------------------------------------
> 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


Re: [math] break up MathUtils?

Posted by Mikkel Meyer Andersen <mi...@mikl.dk>.
2011/10/3 Gilles Sadowski <gi...@harfang.homelinux.org>:
> On Mon, Oct 03, 2011 at 05:42:15PM +0200, Mikkel Meyer Andersen wrote:
>> 2011/10/3 Phil Steitz <ph...@gmail.com>:
>> > I agree with Gilles' recent comment that this class is bloated.  Any ideas on how to break it up?  Now would be a good time to so it.
>> >
>> > Phil
>> One way would be to divide it into DiscreteUtils (int's and long's)
>> and ContinuousUtils (float's and double's).
>
> I'd rather divide it along conceptual lines. E.g.
>  Arithmetics (for "addAndCheck")
>  Precision (for "equals", "compare")
>  Binomial (for "binomialCoefficient")
>  MathArrays (for "linearCombination", "distance", "safeNorm", ...)
>  Function (for "pow", "cosh", ...) [But maybe those should go in FastMath].
>
>
> Best regards,
> Gilles
+1, this seems like a good way.

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


Re: [math] break up MathUtils?

Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
On Mon, Oct 03, 2011 at 05:42:15PM +0200, Mikkel Meyer Andersen wrote:
> 2011/10/3 Phil Steitz <ph...@gmail.com>:
> > I agree with Gilles' recent comment that this class is bloated.  Any ideas on how to break it up?  Now would be a good time to so it.
> >
> > Phil
> One way would be to divide it into DiscreteUtils (int's and long's)
> and ContinuousUtils (float's and double's).

I'd rather divide it along conceptual lines. E.g.
  Arithmetics (for "addAndCheck")
  Precision (for "equals", "compare")
  Binomial (for "binomialCoefficient")
  MathArrays (for "linearCombination", "distance", "safeNorm", ...)
  Function (for "pow", "cosh", ...) [But maybe those should go in FastMath].


Best regards,
Gilles

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


Re: [math] break up MathUtils?

Posted by Mikkel Meyer Andersen <mi...@mikl.dk>.
2011/10/3 Phil Steitz <ph...@gmail.com>:
> I agree with Gilles' recent comment that this class is bloated.  Any ideas on how to break it up?  Now would be a good time to so it.
>
> Phil
One way would be to divide it into DiscreteUtils (int's and long's)
and ContinuousUtils (float's and double's).

Cheers, Mikkel.

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