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

Replacement of the HasDensity<P>-interface with a "double density(double x)"-method on the AbstractContinuousDistribution

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1
    • None
    • None

    Description

      Removed the HasDensity<P>-interface and replaced it with a "public double density(double x)"-method on the AbstractContinuousDistribution-class (it throws an exception as default if the classes don't override the method).

      Implemented density-functions for the F-distribution, t-distribution, Weibull distribution, and Cauchy distribution (the only continuous ones without a density implemented).

      A side-effect is that ChiSquaredDistributionImpl now uses an internal GammaDistributionImpl instead of a GammaDistribution. This is the only "major" change.

      This improvement replaces https://issues.apache.org/jira/browse/MATH-330 (density implementation for the F-distribution) and https://issues.apache.org/jira/browse/MATH-331 (density implementation for the other three distributions).

      Attachments

        1. patch-all
          18 kB
          Mikkel Meyer Andersen

        Activity

          People

            Unassigned Unassigned
            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 - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified