commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabian Lange (JIRA)" <>
Subject [jira] [Commented] (MATH-1228) First Moment is not public
Date Sat, 07 May 2016 07:31:12 GMT


Fabian Lange commented on MATH-1228:

I have not taken it to the ML. for me it is a clear API bug that public API contains private
classes. In fact this is a violation of the osgi contract, because the package is exported:

Export-Package: org.apache.commons.math3.stat.descriptive.moment;version="3.6.1"

if you would use the felix bundle plugin it would print: Warning: The exported package org.apache.commons.math3.stat.descriptive.moment
contains references to non-public classes.

> First Moment is not public
> --------------------------
>                 Key: MATH-1228
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.5
>            Reporter: Fabian Lange
> Hi there,
> is there a specific reason FirstMoment is not public?
> I want to calculate a mean over a List<Double>, for that I want to loop over that
list and invoke Mean.increment(listValue), however this is slower than it could be. Every
increment call makes a check to incMoment.
> I could avoid that if I use a FirstMoment directly, but I cannot create an instance,
because it is protected.
> Also this effectively means that the public constructor Mean(FirstMoment) is not usable.

This message was sent by Atlassian JIRA

View raw message