PiecewiseLinearVariable.this

Constructs a piecewise linear random variable from an array of points defining its distribution. (community summary)

struct PiecewiseLinearVariable(T)
this
(
T[] points
,,
T[] areas
)
if (
isFloatingPoint!T
)

Parameters

points T[]

strictly increasing sequence of interval bounds.

weights T[]

density points

areas T[]

user allocated uninitialized array Constrains: points.length == weights.length
areas.length > 0
areas.length + 1 == weights.length