[
https://issues.apache.org/jira/browse/STATISTICS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735138#comment-17735138
]
Gilles Sadowski commented on STATISTICS-71:
-------------------------------------------
{quote}
{code}
long getN();
{code}
{quote}
Shouldn't we stick to names used by the JDK whenever the semantics is identical?
{quote}
{code}
StorelessUnivariateStatistic add(double d);
{code}
{quote}
What's the intended usage?
With the {{addAll}} methods, the API is not minimal (for a
{{StorelessStatistics}}): Processing of an array could be delegated to factory
methods defined in implementations. For example:
{code}
final Min stat = Min.of(1.2, 3.4, -5.6);
final double[] a = {-2.3, -0.1, 3.2, 4.3};
stat.combine(Min.of(a));
{code}
> Implementation of Univariate Statistics
> ---------------------------------------
>
> Key: STATISTICS-71
> URL: https://issues.apache.org/jira/browse/STATISTICS-71
> Project: Commons Statistics
> Issue Type: Task
> Components: descriptive
> Reporter: Anirudh Joshi
> Priority: Minor
> Labels: gsoc, gsoc2023
>
> Jira ticket to track the implementation of the Univariate statistics required
> for the updated SummaryStatistics API.
> The implementation would be "storeless". It should be used for calculating
> statistics that can be computed in one pass through the data without storing
> the sample values.
> Currently I have the definition of API as (this might evolve as I continue
> working)
> {code:java}
> public interface StorelessUnivariateStatistic extends DoubleConsumer,
> DoubleSupplier {
> StorelessUnivariateStatistic add(double d);
> StorelessUnivariateStatistic addAll(double[] values);
> StorelessUnivariateStatistic addAll(double[] values, int start, int
> length);
> long getN();
> void combine(StorelessUnivariateStatistic other);
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)