[
https://issues.apache.org/jira/browse/MATH-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13798963#comment-13798963
]
Gilles edited comment on MATH-1043 at 10/18/13 9:53 AM:
--------------------------------------------------------
Thomas, Phil,
bq. I doubt that any math user will ever use a method like this.
It depends from what angle you see this feature.
The purpose may well be that people who want this feature should use CM rather
than CL.
It is (too obviously?) a mathematical operation.
Besides, this is rightly going to be in a "XxxUtils" class, where _new_
potential users might want too look for this kind of features.
bq. [...] dread over extending all of the double[]-taking methods in [math] to
var args [...]
Without further motivated requests, that's certainly not the intention.
This feature can be more useful as an extension of what is already in CM (which
includes overflow checking), than as a just syntactic sugar implemented in CL.
Also, avoiding (however small) duplication, especially between Commons
components is a worthy goal IMO (as I pointed out recently in one of the
threads on the ML). And it makes more sense (IMHO) to add this in CM rather
than have a trivial extension in CL depend on CM.
was (Author: erans):
Thomas, Phil,
bq. I doubt that any math user will ever use a method like this.
It depends from what angle you see this feature.
The purpose may well be that people who want this feature should use CM rather
than CL.
It is (too obviously?) a mathematical operation.
Besides, this is rightly going to be in a "XxxUtils" class.
bq. [...] dread over extending all of the double[]-taking methods in [math] to
var args [...]
Without further motivated requests, that's certainly not the intention.
This feature can be more useful as an extension of what is already in CM (which
includes overflow checking), than as a just syntactic sugar implemented in CL.
Also, avoiding (however small) duplication, especially between Commons
components is a worthy goal IMO (as I pointed out recently in one of the
threads on the ML). And it makes more sense (IMHO) to add this in CM rather
than have a trivial extension in CL depend on CM.
> MathUtils.sum() method to add together a bunch of numbers.
> ----------------------------------------------------------
>
> Key: MATH-1043
> URL: https://issues.apache.org/jira/browse/MATH-1043
> Project: Commons Math
> Issue Type: New Feature
> Environment: Any
> Reporter: Matt Bishop
> Priority: Minor
>
> I find myself doing sums frequently with a variety of numbers. It would be
> nice if MathUtils had a method like this:
> int add(int... numbers);
--
This message was sent by Atlassian JIRA
(v6.1#6144)