njoy / math

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

Feature/probability distribution decorators #16

Closed apmccartney closed 8 years ago

apmccartney commented 8 years ago

Added compile time decorators for probability distributions. See the Decorator Design Pattern.

These decorators modify the behavior of the probabilityDensity and cumulativeProbability of the composed probability distribution instance. Four decorators are provided:

A probability distribution template has been provided to accomodate data specified in terms of an arbitrary number of equiprobable bins. The template is specified in terms of an ownership policy and hence can be provide data ownership or reference data owned otherwise.

BivariateProbabilityDistribution API and implementation template have been renamed ConditionalProbabilityDistribution

jlconlin commented 8 years ago

Looks pretty good, but there needs to be some documentation explaining the new decorators. Otherwise, someone may not know how they should be used or when.