Class COptQuestPowerDistribution

java.lang.Object
com.opttek.optquest.COptQuestPowerDistribution
All Implemented Interfaces:
com.opttek.optquest.IProbabilityDistribution

public class COptQuestPowerDistribution extends Object implements com.opttek.optquest.IProbabilityDistribution
  • Constructor Summary

    Constructors
    Constructor
    Description
    COptQuestPowerDistribution(double rmin, double rmax, double power)
    Constructs a power distribution for uniform sampling in the radial interval [rmin, rmax].
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    cdf(double r)
     
    static double
    CDF(double r, double power)
     
    static double
    CDF(double r, double rmin, double rmax, double power)
    Computes the CDF of the power-law distribution on [rmin, rmax].
    double
    chaz(double r)
     
    static double
    CHAZ(double r, double power)
     
    static double
    CHAZ(double r, double rmin, double rmax, double power)
    Computes the cumulative hazard function CHAZ(r) = -log(SF(r)).
    double
    haz(double r)
     
    static double
    HAZ(double r, double power)
     
    static double
    HAZ(double r, double rmin, double rmax, double power)
    Computes the hazard function HAZ(r) = PDF(r) / SF(r).
    double
    pdf(double r)
     
    static double
    PDF(double r, double power)
     
    static double
    PDF(double r, double rmin, double rmax, double power)
    Computes the PDF of the power-law distribution on [rmin, rmax].
    double
    ppf(double p)
     
    static double
    PPF(double p, double power)
     
    static double
    PPF(double p, double rmin, double rmax, double power)
    Computes the PPF (inverse CDF) for sampling.
    double
    sf(double r)
     
    static double
    SF(double r, double power)
     
    static double
    SF(double r, double rmin, double rmax, double power)
    Computes the survival function SF(r) = 1 - CDF(r).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • COptQuestPowerDistribution

      public COptQuestPowerDistribution(double rmin, double rmax, double power)
      Constructs a power distribution for uniform sampling in the radial interval [rmin, rmax].

      This distribution is used to generate radii r such that points are uniformly distributed by area (power=2) or volume (power=3) within the annular/spherical shell [rmin, rmax]. When rmin = 0, this reduces to the classic disk/ball sampling from the origin.

      Parameters:
      rmin - inner radius (≥ 0)
      rmax - outer radius (> rmin)
      power - volume/area exponent (> 0). Use 2 for disk/annulus, 3 for ball/shell.
  • Method Details

    • pdf

      public double pdf(double r)
      Specified by:
      pdf in interface com.opttek.optquest.IProbabilityDistribution
    • cdf

      public double cdf(double r)
      Specified by:
      cdf in interface com.opttek.optquest.IProbabilityDistribution
    • ppf

      public double ppf(double p)
      Specified by:
      ppf in interface com.opttek.optquest.IProbabilityDistribution
    • sf

      public double sf(double r)
      Specified by:
      sf in interface com.opttek.optquest.IProbabilityDistribution
    • chaz

      public double chaz(double r)
      Specified by:
      chaz in interface com.opttek.optquest.IProbabilityDistribution
    • haz

      public double haz(double r)
      Specified by:
      haz in interface com.opttek.optquest.IProbabilityDistribution
    • PDF

      public static double PDF(double r, double rmin, double rmax, double power)
      Computes the PDF of the power-law distribution on [rmin, rmax].

      pdf(r) = (power / (rmax^power - rmin^power)) * r^(power-1) for rmin ≤ r ≤ rmax

    • CDF

      public static double CDF(double r, double rmin, double rmax, double power)
      Computes the CDF of the power-law distribution on [rmin, rmax].

      CDF(r) = (r^power - rmin^power) / (rmax^power - rmin^power)

    • PPF

      public static double PPF(double p, double rmin, double rmax, double power)
      Computes the PPF (inverse CDF) for sampling.

      ppf(p) = [rmin^power + p * (rmax^power - rmin^power)]^(1/power)

    • SF

      public static double SF(double r, double rmin, double rmax, double power)
      Computes the survival function SF(r) = 1 - CDF(r).
    • CHAZ

      public static double CHAZ(double r, double rmin, double rmax, double power)
      Computes the cumulative hazard function CHAZ(r) = -log(SF(r)).
    • HAZ

      public static double HAZ(double r, double rmin, double rmax, double power)
      Computes the hazard function HAZ(r) = PDF(r) / SF(r).
    • PDF

      public static double PDF(double r, double power)
    • CDF

      public static double CDF(double r, double power)
    • PPF

      public static double PPF(double p, double power)
    • SF

      public static double SF(double r, double power)
    • CHAZ

      public static double CHAZ(double r, double power)
    • HAZ

      public static double HAZ(double r, double power)