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 Re: [math] Checking preconditions on package private functions
Date Tue, 27 Nov 2012 03:37:53 GMT
Hi,


2012/11/26 Gilles Sadowski <gilles@harfang.homelinux.org>

> Hi.
>
> > in classes Gamma and Beta, some functions are package private:
> >   - logGammaSum
> >   - logGammaMinusLogGammaSum (for lack of a better name)
> >   - bcorr
> > These functions are meant to be used by other functions,
>
> None of these functions seem to used. Am I missing something?
>
> None of these functions are used YET, they are going to be used in the new
implementation of logBeta. I wouldn't have committed tortuous, useless,
package private functions just for the sake of cluttering the code!

S.

Gilles
>
> > like logBeta. Each
> > of these functions have their own domain, and in logBeta, we make sure
> not
> > to call them outside this domain.
> > For the time being, I've implemented explicit checks on the arguments +
> > exceptions in these auxiliary functions. I guess this comes with a cost,
> > which is arguably unnecessary.
> > Should I remove these tests, and clearly state in the Javadoc that the
> > caller should make sure that the argument is valid?
> > I'm OK with both solutions (keeping/removing the tests).
> >
> > Best regards,
> > S├ębastien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message