Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1046

math3.stat.Frequency: Allow Null keys (comparable objects)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Not A Problem
    • 3.2
    • 3.2
    • None
    • Linux, JDK 7

    Description

      The class math3.stat.Frequency uses a TreeMap which does not allow
      for the use of null keys (public void addValue(Comparable<?> v) with v = null). I am analyzing data (matrix) whose values may
      contain nulls. I need to get the counts for elements in a given column.
      This includes knowing how many are null. This information will be used
      for data cleaning/pre-processing.

      A simple change would be substituting TreeMap with java.util.HashMap<K,V>.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hmf Hugo Ferrira
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: