You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dan Checkoway (JIRA)" <ji...@apache.org> on 2011/01/13 06:06:45 UTC

[jira] Created: (MATH-474) Frequency: new method: merge(Frequency)

Frequency: new method: merge(Frequency)
---------------------------------------

                 Key: MATH-474
                 URL: https://issues.apache.org/jira/browse/MATH-474
             Project: Commons Math
          Issue Type: Improvement
            Reporter: Dan Checkoway


I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:

public void merge(Frequency other);
public void merge(Collection<Frequency> others);

I'd be happy to submit a patch if that would help...

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


[jira] [Commented] (MATH-474) Frequency: new method: merge(Frequency)

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

Thomas Neidhart commented on MATH-474:
--------------------------------------

Thanks for the patch!
                
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (MATH-474) Frequency: new method: merge(Frequency)

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

Phil Steitz updated MATH-474:
-----------------------------

    Assignee:     (was: Phil Steitz)
    
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>             Fix For: 3.0
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (MATH-474) Frequency: new method: merge(Frequency)

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

Gilles updated MATH-474:
------------------------

         Priority: Minor  (was: Major)
    Fix Version/s:     (was: 3.1)
    
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>            Priority: Minor
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MATH-474) Frequency: new method: merge(Frequency)

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

Gilles commented on MATH-474:
-----------------------------

Would you provide an updated patch?

                
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>             Fix For: 3.1
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MATH-474) Frequency: new method: merge(Frequency)

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

Phil Steitz updated MATH-474:
-----------------------------

    Fix Version/s: 3.0

+1 for this enhancement.  Thanks in advance for the patch.  Make sure to document the fact that the freqs being merged need to contain only mutually comparable values.  If and when we address MATH-474, that requirement will only apply to merging "full" Frequency instances.

> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>             Fix For: 3.0
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

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


[jira] [Resolved] (MATH-474) Frequency: new method: merge(Frequency)

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

Thomas Neidhart resolved MATH-474.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1

Applied patch together with unit tests in r1400683.
                
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (MATH-474) Frequency: new method: merge(Frequency)

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

Dan Checkoway updated MATH-474:
-------------------------------

    Attachment: MATH-474.patch

Attached is a patch that adds the following methods:

Frequency.entrySetIterator -- it's way more efficient to use the entry set when iterating a map, particularly when you'll need access to values as well as keys.  Avoid a "get" for every iteration.

Frequency.merge(Frequency)

Frequency.merge(Collection<Frequency>)

Please code review and apply as you see fit.  I have an ICLA on file with Apache for my contributions to Camel, in case that matters.  Hope this helps!

> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>             Fix For: 3.0
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

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


[jira] [Updated] (MATH-474) Frequency: new method: merge(Frequency)

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

Gilles updated MATH-474:
------------------------

    Fix Version/s:     (was: 3.0)
                   3.1

Postponed due to the absence of an updated patch.

                
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>             Fix For: 3.1
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MATH-474) Frequency: new method: merge(Frequency)

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

Gilles commented on MATH-474:
-----------------------------

Hello Dan.

Really sorry for the (long!) delay in examining your contribution.
I've noticed that the patch does not provide unit tests; could you please add some?
Thanks.

                
> Frequency: new method: merge(Frequency)
> ---------------------------------------
>
>                 Key: MATH-474
>                 URL: https://issues.apache.org/jira/browse/MATH-474
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dan Checkoway
>             Fix For: 3.0
>
>         Attachments: MATH-474.patch
>
>
> I'd like to propose an enhancement to org.apache.commons.math.stat.Frequency.  I need to "merge" multiple Frequency objects, and it would be great if Frequency had inherent support for this, such as:
> public void merge(Frequency other);
> public void merge(Collection<Frequency> others);
> I'd be happy to submit a patch if that would help...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira