[ https://issues.apache.org/jira/browse/STATISTICS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739654#comment-17739654 ]
Anirudh Joshi edited comment on STATISTICS-71 at 7/3/23 3:21 PM: ----------------------------------------------------------------- {quote}[. . .] if you do implement stored statistics then you can combine any stored statistic with another. The type will not matter [. . .] {quote} Do you think its more clear if I rename StatisticAccumulator to TypeSafeStatisticAccumulator for now ? Also, when we implement stored statistics in the future we could have another accumulator interface StoredStatisticAccumulator as follows {code:java} public interface StoredStatisticAccumulator { void combine(StoredDoubleStatistic other); }{code} And have the statistic impl classes implement both TypeSafeStatisticAccumulator and StoredStatisticAccumulator. We could have the "stored" flavors support both type safe combine and unbounded combine. We could have the "storeless" flavor throw unsupported operation exception if combine(StoredDoubleStatisitc other) is invoked on the instance ? was (Author: JIRAUSER299640): {quote}[. . .] if you do implement stored statistics then you can combine any stored statistic with another. The type will not matter [. . .] {quote} Do you think its more clear if I rename StatisticAccumulator to TypeSafeStatisticAccumulator for now ? Also, when we implement stored statistics in the future we could have another accumulator interface StoredStatisticAccumulator as follows {code:java} public interface StoredStatisticAccumulator { void combine(StoredDoubleStatisitc other); }{code} And have the statistic impl classes implement both TypeSafeStatisticAccumulator and StoredStatisticAccumulator. We could have the "stored" flavors support both type sage combine and unbounded combine. We could have the "storeless" flavor throw unsupported operation exception if combine(StoredDoubleStatisitc other) is invoked on the instance ? > 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 DoubleStorelessUnivariateStatistic extends DoubleSupplier { > DoubleStorelessUnivariateStatistic add(double v); > long getCount(); > void combine(DoubleStorelessUnivariateStatistic other); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)