This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The output cdf is piecewise linear cumulative
distribution function specified by a list of points
{{x1,F(x1)}, {x2,F(x2}}, ... ,{xn, F(xn)}. The input
tuples is assumed to be a piecewise linear
function that by default (rescaleQ= true) will be
normalized using normalizePLpdf() to come up with a
piecewise linear density function that has the unit interval as its
support.
Functions.plCDF({{x1,y1},{x2,y2}, ...}); // rescaleQ= true
Functions.plCDF({{x1,y1},{x2,y2}, ...}, rescaleQ = false);
plCDF({{0,2},{5,2},{10,2}}); // {{0,0},{0.5,0.5},{1,1}}
plCDF({{0,1},{1,2},{2,4},{3,5}}); // {{0,0},{0.33..,0.16..},{0.66..,0.5},{1,1}}
encapsulated function plCDF
import BusinessSimulation.Icons.Function;
import BusinessSimulation.Functions.{normalizePLpdf,areaLineSegment};
extends Function;
input Real[:, 2] tuples "Piecewise linear function, i.e., { {x1,f(x1), {x2,f(x2)}, ... }";
input Boolean rescaleQ = true "= true, if the support is to be rescaled to the unit interval";
output Real[size(tuples, 1), 2] cdf "Piecewise linear cumulated distribution function";
end plCDF;