This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The output y is the area under a piecewise linear probability distribution function specified by a list of points p1, p2, ... pn.
Functions.normalizationConstant({{x1,y1},{x2,y2}, ...});
y := 0.0; for i in 1:n - 1 loop y := y + areaLineSegment(plPDF[i], plPDF[i + 1]); end for;
normalizationConstant({{1,1},{2,2}}); // 1.5 normalizationConstant({{0,1},{10,1}}); // 10.0
encapsulated function normalizationConstant import ICON = BusinessSimulation.Icons.Function; import BusinessSimulation.Functions.areaLineSegment; extends ICON; input Real[:, 2] plPDF "Piecewise linear probability density function, i.e., { p1, p2, ... }"; output Real y "Area under the probability density function"; end normalizationConstant;