public class CdfIntegration extends Object
| Constructor and Description |
|---|
CdfIntegration() |
| Modifier and Type | Method and Description |
|---|---|
double[][] |
getCdf(PDF pdf,
boolean logAxis,
int nPoints,
double rMin,
double rMax,
boolean normalisePdf,
boolean integrateToInfinite)
Calculate the CDF by integrating the PDF in a finite interval.
|
double |
getDeltaThreshold() |
int |
getIterationLimit() |
double[] |
getPercentiles(double[][] cdf,
double... percentiles) |
protected double |
integrateBooleRule(PDF pdf,
double min,
double max)
Integrate the PDF over a finite interval using Boole's rule
|
protected double |
integrateBooleRule(PDF pdf,
double min,
double max,
double pdfAtMin,
double pdfAtMax)
Integrate the PDF over a finite interval using Boole's rule
This implementation uses the value of the PDF at the boundaries that
has already been calculated externally, thus avoiding unnecesary calls
to
PDF.getUnnormalizedProbabilityAt(double) |
protected double |
integrateToInfinitum(PDF pdf,
boolean logAxis,
double minR,
double step) |
void |
setDeltaThreshold(double deltaThreshold) |
void |
setIterationLimit(int iterationLimit) |
public double[][] getCdf(PDF pdf, boolean logAxis, int nPoints, double rMin, double rMax, boolean normalisePdf, boolean integrateToInfinite)
setDeltaThreshold(double) and
setIterationLimit(int)pdf - Probability Distribution FunctionlogAxis - True if the points should be distributed logaritmically, false otherwisenPoints - Number of points to be calculated in the rangerMin - Minimum value of the range, in parsecsrMax - Maximum value of the range, in parsecsprotected double integrateBooleRule(PDF pdf, double min, double max)
pdf - probability distribution function to integratemin - Minimum value of x (in linear units)max - Maximum value of x (in linear units)protected double integrateBooleRule(PDF pdf, double min, double max, double pdfAtMin, double pdfAtMax)
PDF.getUnnormalizedProbabilityAt(double)pdf - probability distribution function to integratemin - Minimum value of x (in linear units)max - Maximum value of x (in linear units)pdfAtMin - Value of the PDF at minpdfAtMax - Value of the PDF at maxprotected double integrateToInfinitum(PDF pdf, boolean logAxis, double minR, double step)
public double[] getPercentiles(double[][] cdf,
double... percentiles)
public double getDeltaThreshold()
public void setDeltaThreshold(double deltaThreshold)
public int getIterationLimit()
public void setIterationLimit(int iterationLimit)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.