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

One of Variance.evaluate() methods does not work correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 3.0
    • Labels:
      None
    • Environment:

      Java 1.6

      Description

      The method org.apache.commons.math.stat.descriptive.moment.Variance.evaluate(double[] values, double[] weights, double mean, int begin, int length) does not work properly. Looks loke it ignores the length parameter and grabs the whole dataset.
      Similar method in Mean class seems to work.
      I did not check other methods taking the part of the array; they may have the same problem.

      Workaround: I had to shrink my arrays and use the method without the length.

        Attachments

        1. MATH-704.patch
          0.6 kB
          Thomas Neidhart

          Activity

            People

            • Assignee:
              psteitz Phil Steitz
              Reporter:
              lilyevsky Leonid Ilyevsky
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: