[
https://issues.apache.org/jira/browse/MATH-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434884#comment-13434884
]
Sébastien Brisard commented on MATH-845:
----------------------------------------
{quote}
In cases where the method is for internal use only, and we are sure that the CM
code calls it correctly, my preference would be to just remove the unused
statement, and replace it with an appropriate comment stating why an explicit
check is not necessary.
{quote}
Interesting! I was about to ask the same question on the ML for another issue
(incomplete beta function).
I really would like to have this point discussed more widely, as I tend to
prefer assertions over simple comments (assertions could be turned on (at
least, locally) during testing).
Of course, I'm in favor of an additional comment stating that explicit check is
deemed unnecessary for private or package private methods. In my case, some
package private methods provide approximations of some functions over a
specific interval. I would then state in the javadoc the interval, and also
that it is the responsibility of the user to make sure that this approximation
is not called outside its domain.
@Sébastien: since you first asked the question, would you like to start a
thread on the ML?
Best regards,
Sébastien (another one ;))
> Basic number theory features such as primality testing, factorization and
> prime number generation
> -------------------------------------------------------------------------------------------------
>
> Key: MATH-845
> URL: https://issues.apache.org/jira/browse/MATH-845
> Project: Commons Math
> Issue Type: New Feature
> Affects Versions: 3.1
> Environment: ubuntu/java6/intel-i5
> Reporter: Sebastien Riou
> Priority: Minor
> Labels: features
> Fix For: 3.1
>
> Attachments: primes-src.zip
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> A set of static methods to perform primality test, factorization and prime
> number generation. Currently it is limited to the int data type, extension to
> long/BigInteger will follow.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira