#include <probabilities.hpp>
Public Member Functions | |
| void | constraints () |
| Constraint checking function. | |
Public Attributes | |
| T::value_type | v |
| Type of value to validate. | |
The Validator Concept applies to classes that can validate the internal representation of likelihoods and probabilities. The likelihood and probabilty classes enforce this concept on the Validator template argument.
value_type. This corresponds to the type used to represent the quantities to be validated. Normally, this is the same as the value_type of the likelihood or probability class; however, it is sufficient that those types are convertible to this value_type.static void is_valid(value_type,linear_domain); static void is_valid(value_type,log_domain);
value_type argument is valid within the corresponding domain. If not, they must signal that case by throwing an exception, typically out_of_range. The following types model the Validator Concept.
and
, respectively. An out_of_range exception is thrown if the value lies outside the interval.epsilon of a boundary are truncated to the appropriate boundary. This handles floating point round-off errors that generate values slightly outside the strict interval appropriate for the domain. An out_of_range exception is thrown if the value lies outside the enlarged interval.
1.4.5