njoy / math

A library providing mathematical abstractions encountered in nuclear data
Other
1 stars 0 forks source link

Add a bounded probability distribution class template #11

Closed apmccartney closed 8 years ago

apmccartney commented 8 years ago

Rather than rely on the composed implementation to be defined for argument values from negative infinity to infinity, the bounded probability distribution only refers to the same class between an upper and lower bound. For values out side that range, the pdf is zero and arguments less than the left bound, the cdf is 0 and for arguments greater than the right bound, the cdf is 1. This also allows the cdf values be confirmed to be 0 and 1 at the left and right bound, respectively, using the composed implementation at those bounds.