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/14 21:54:34 UTC
[jira] [Created] (MATH-824) Algebra Utils
ori ziv created MATH-824:
----------------------------
Summary: Algebra Utils
Key: MATH-824
URL: https://issues.apache.org/jira/browse/MATH-824
Project: Commons Math
Issue Type: New Feature
Reporter: ori ziv
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
[jira] [Commented] (MATH-824) Algebra Utils
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414523#comment-13414523 ]
Gilles commented on MATH-824:
-----------------------------
Hi.
Asking questions or proposing new features is best done through the mailing lists channel:
http://commons.apache.org/math/mail-lists.html
The bug tracking system is preferred for filing reports on identified bugs or tasks to be performed (e.g. after they have been discussed on the "dev" mailing list).
This kind of utilities is located in the "MathUtils" class (package "org.apache.commons.math3.util").
> 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
[jira] [Updated] (MATH-824) Algebra Utils
Posted by "Gilles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles updated MATH-824:
------------------------
Priority: Minor (was: Major)
Issue Type: Wish (was: New Feature)
> 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
[jira] [Updated] (MATH-824) Algebra Utils
Posted by "ori ziv (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ori ziv updated MATH-824:
-------------------------
Attachment: AlgebraUtils.java
(prototype)
> Algebra Utils
> -------------
>
> Key: MATH-824
> URL: https://issues.apache.org/jira/browse/MATH-824
> Project: Commons Math
> Issue Type: New Feature
> Reporter: ori ziv
> 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
[jira] [Closed] (MATH-824) Algebra Utils
Posted by "ori ziv (JIRA)" <ji...@apache.org>.
[ 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