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] Checking preconditions on package private functions
Date Mon, 26 Nov 2012 19:59:37 GMT
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, 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

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