commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Resolved: (MATH-448) Frequency get number of unique values
Date Mon, 13 Dec 2010 00:48:00 GMT


Phil Steitz resolved MATH-448.

    Resolution: Fixed

Thanks for the patch!

I committed a slightly modified version in r1044981.   I made the following changes to the

* Changed the javadoc to refer to "values" to be consistent with the rest of the documentation
* Used keyset.size() to compute the result
* Added test cases

> Frequency get number of unique values
> -------------------------------------
>                 Key: MATH-448
>                 URL:
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>             Fix For: 2.2
>         Attachments: MATH-448.patch, MATH-448.patch
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
> It is often useful to know the number of unique elements in a frequency table. Could
you add a simple method that returns the size of freqTable. It seems like it would be as simple
> {code}
> public int getUniqueCount(){
>      return freqTable.size();
> }
> {code}
> Given that freqTable is private, there is no way to extend the class and add this method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message