[ 
https://issues.apache.org/jira/browse/STATISTICS-14?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16854120#comment-16854120
 ] 

Alex D Herbert commented on STATISTICS-14:
------------------------------------------

Q. Why the {{bigdecimal}} package name?

Is the intension to have {{org.apache.commons.statistics.descriptive}} only 
support {{double}}? These statistics apply to any number but at least matching 
the JDK SummaryStatistics classes they could support {{double}}, {{long}} and 
{{int}} to be useable in the specialised stream implementations for those types.

I don't see why this class cannot be in 
{{org.apache.commons.statistics.descriptive}}.

Note that there could also be a specialisation for {{BigInteger}}. This would 
warrant {{org.apache.commons.statistics.biginteger.descriptive}} under this 
package naming convention.

Would it not be more consistent with the JDK primitive specialisations to have 
all descriptive statistics prefixed with the primitive/BigNumber name and be in 
the same package? E.g.

{code:java}
// For a single descriptive statistic
IntMean
LongMean
DoubleMean
BigDecimalMean
BigIntegerMean
// For functionality matching the JDK statistics implementations
BigDecimalStatistics
BigIntegerStatistics
{code}

A negative is that it would make the package quite crowded.

 

> BigDecimalStatistics
> --------------------
>
>                 Key: STATISTICS-14
>                 URL: https://issues.apache.org/jira/browse/STATISTICS-14
>             Project: Apache Commons Statistics
>          Issue Type: New Feature
>            Reporter: Aleksander Ściborek
>            Priority: Major
>
> The idea is to create a util class for reducing stream of BigDecimal objects 
> and then getting an object which contains statistics such as 
> 1)Min and max value
> 2)Average
> 3)Total sum



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to