#include <probabilities.hpp>
Perform operations on likelihoods and probabilities within the log domain. Within this domain, a likelihood or probability is represented internally by the logarithm of its value and, where appropriate, operations are performed directly on the logarithms. For example, the multiplication operator (operator*() is implemented in terms of addition of the internal (log) values. The log_domain type is used to signal the domain of operation when transforming either the domain or value of a probability object. In addition, it is used to signal the domain for certain constructors.
Not all operations can be provided within the log domain without incurring substantial costs associated with transforming to the linear domain. For example, the addition of probabilities cannot be formed directly within the log domain. As a design decision, these operations are not provided under the assumption that such expensive operations should be requested explicitly by the client code.
1.4.5