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

DescriptiveStatistics based on double[]

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.2, 3.0
    • None
    • None

    Description

      Right now the DescriptiveStatistics is for ResizableDoubleArray, but if the user has the double[] data she wishes to get DescriptiveStatistics for there is no way of doing this (besides the inefficient way of creating a ResizableDoubleArray from the double[]).

      It would be possible to use StatUtils, but it does not contain near as much functionality as DescriptiveStatistics.

      Idea: Create a DescriptiveStatistics for double[] also. I'm not sure which way of implementing it would be the best, but one way would be to make DescriptiveStatistics abstract with all but the apply-method implemented as now. The apply-method should be made as abstract which then has to implemented in the extensions together with a field containing the values. (addValue, windowSize etc. has to go in the ResizableDoubleArray-extension.) The double[]-extension should then have a constructor taking double[] as a parameter.

      Attachments

        1. ResizableArrayInstantiatedByArray
          2 kB
          Mikkel Meyer Andersen
        2. patch-MATH-384-2
          7 kB
          Mikkel Meyer Andersen
        3. MATH384-3_0
          6 kB
          Mikkel Meyer Andersen
        4. MATH384-2_2
          5 kB
          Mikkel Meyer Andersen

        Activity

          People

            mikl Mikkel Meyer Andersen
            mikl Mikkel Meyer Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified