commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Checkoway (JIRA)" <>
Subject [jira] Created: (MATH-473) Frequency: new option: NON-sorted
Date Thu, 13 Jan 2011 05:04:45 GMT
Frequency: new option: NON-sorted

                 Key: MATH-473
             Project: Commons Math
          Issue Type: Improvement
            Reporter: Dan Checkoway

I have a request for enhancement on org.apache.commons.math.stat.Frequency.  I would like
to be able to specify that the the backing map NOT be sorted.  Right now it uses TreeMap.
 I would like to have the option of specifying that sorting is not important, and would in
fact hinder performance, and a plain old HashMap should be used instead.

i.e. constructor such as:

public Frequency(boolean sorted);

If sorted is true, use a TreeMap.  If sorted is false, use a HashMap.  Is this feasible? 
I'd be happy to contribute 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.

View raw message