You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Patrick Meyer (JIRA)" <ji...@apache.org> on 2010/12/01 16:12:11 UTC

[jira] Created: (MATH-448) Frequency get number of unique values

Frequency get number of unique values
-------------------------------------

                 Key: MATH-448
                 URL: https://issues.apache.org/jira/browse/MATH-448
             Project: Commons Math
          Issue Type: New Feature
            Reporter: Patrick Meyer
            Priority: Minor


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 as:

{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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Meyer updated MATH-448:
-------------------------------

    Attachment: Frequency.diff

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: Frequency.diff
>
>   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 as:
> {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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated MATH-448:
-----------------------------

    Fix Version/s: 2.2

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             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 as:
> {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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Meyer updated MATH-448:
-------------------------------

    Attachment:     (was: Frequency.diff)

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: Frequency.diff
>
>   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 as:
> {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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Meyer updated MATH-448:
-------------------------------

    Attachment: Frequency.diff

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: Frequency.diff
>
>   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 as:
> {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. Thanks!

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


[jira] Commented: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968555#action_12968555 ] 

Patrick Meyer commented on MATH-448:
------------------------------------

All right, maybe I have it right this time. I used Eclipse to generate the patch and it seems to have the right information in it. The latest path file (MATH-448.patch) is now attached to this issue.

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: 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 as:
> {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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Meyer updated MATH-448:
-------------------------------

    Attachment:     (was: Frequency.diff)

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: 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 as:
> {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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Meyer updated MATH-448:
-------------------------------

    Attachment: MATH-448.patch

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: 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 as:
> {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. Thanks!

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


[jira] Updated: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Meyer updated MATH-448:
-------------------------------

    Attachment: MATH-448.patch

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         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 as:
> {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. Thanks!

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


[jira] [Closed] (MATH-448) Frequency get number of unique values

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luc Maisonobe closed MATH-448.
------------------------------


Closing issue as it was included in version 2.2, which has been released

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             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 as:
> {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. Thanks!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (MATH-448) Frequency get number of unique values

Posted by "Patrick Meyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967252#action_12967252 ] 

Patrick Meyer commented on MATH-448:
------------------------------------

OK, I uploaded a new patch that was created using the "Export Diff Patch" option in Netbeans. Is this the format you need? (This is the first patch I've tried to submit - thanks for your patience.)

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: Frequency.diff
>
>   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 as:
> {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. Thanks!

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


[jira] Commented: (MATH-448) Frequency get number of unique values

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967244#action_12967244 ] 

Sebb commented on MATH-448:
---------------------------

Thanks for the patch, however it is not usable as it stands, as it is not in the correct format.

Patches need to be unified diffs, in plain text (not RTF as appears to be the case here).

> Frequency get number of unique values
> -------------------------------------
>
>                 Key: MATH-448
>                 URL: https://issues.apache.org/jira/browse/MATH-448
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Patrick Meyer
>            Priority: Minor
>         Attachments: Frequency.diff
>
>   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 as:
> {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. Thanks!

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


[jira] Resolved: (MATH-448) Frequency get number of unique values

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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 patch:

* 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: https://issues.apache.org/jira/browse/MATH-448
>             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 as:
> {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. Thanks!

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