commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-944) Consider making a generic version of class Frequency
Date Fri, 08 Nov 2013 17:36:17 GMT

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

Thomas Neidhart commented on MATH-944:
--------------------------------------

{quote}
Some methods should be renamed in the patch (a.o. those that have shortened names).
{quote}

Agreed.

{quote}
Will the current class be deprecated?
{quote}

Hmm, good question. It probably depends on whether there are enough users that want to keep
using the existing interface.
It may make also sense to provide Frequency versions that store primitives as-is without converting
them to their wrapper classes.
Although we would need to add a templating mechanism similar to mahout collections.

> Consider making a generic version of class Frequency
> ----------------------------------------------------
>
>                 Key: MATH-944
>                 URL: https://issues.apache.org/jira/browse/MATH-944
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Thomas Neidhart
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: Frequency.java
>
>
> The current version of the Frequency class is quite complex, as it has to handle different
input values and does a lot of casting.
> The class is also not very safe in the sense that adding different data types will lead
to runtime exceptions.
> The class could be simplified by introducing a generic version. The only downside so
far is that the current version treats ints and longs together, which would not be possible
with a generic version.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message