PWCEmpiricalCDF

constructor(breakPoints: DoubleArray, proportions: DoubleArray = DoubleArray(breakPoints.size - 1) { 1.0 / (breakPoints.size - 1) }, name: String? = null)

Creates an instance of PWCEmpiricalCDF.

Parameters

breakPoints

Array of doubles representing the breakpoints. The array must be sorted and values must be finite. There must be at least two breakpoints, and the values must strictly increase. These define the boundaries of the distribution's intervals.

proportions

Optional array of proportions corresponding to each interval between breakpoints. The array size should be one less than the size of the breakPoints array. By default, all intervals are assigned equal portions of probability. The proportions must form a valid probability distribution and be in the range (0,1).

name

Optional name for the distribution, defaulting to null if not provided.