You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ori ziv (JIRA)" <ji...@apache.org> on 2012/07/15 13:02:34 UTC
[jira] [Closed] (MATH-824) Algebra Utils
[ https://issues.apache.org/jira/browse/MATH-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ori ziv closed MATH-824.
------------------------
Resolution: Not A Problem
> Algebra Utils
> -------------
>
> Key: MATH-824
> URL: https://issues.apache.org/jira/browse/MATH-824
> Project: Commons Math
> Issue Type: Wish
> Reporter: ori ziv
> Priority: Minor
> Attachments: AlgebraUtils.java
>
>
> Is there a place here for basic but repeated methods such as:
> public static void verifyPositive(double number) {
> verifyBigger(number, 0, false);
> }
> public static void verifyTwoOrMore(double number) {
> verifyBigger(number, 2, true);
> }
> public static void verifyBigger(double number, double minimum,
> boolean isExactOK) {
> if (!isBigger(number, minimum, isExactOK)) {
> throw new IllegalArgumentException(number
> + (isExactOK ? "<" : "<=") + minimum);
> }
> }
> public static boolean isBigger(double number, double minimum,
> boolean isExactOK) {
> return number > minimum || isExactOK && number == minimum;
> }
--
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