boost::probabilities::truncating_validator< Type, Value > Class Template Reference

Truncating validator. More...

#include <probabilities.hpp>

List of all members.

Public Types

typedef Value value_type

Static Public Member Functions

template<typename Domain>
static void is_valid (value_type &v, Domain)
static value_type epsilon ()
 Inspect the tolerance imposed on the boundaries.
static value_type epsilon (value_type epsilon)
 Set the tolerance imposed on the boundaries.


Detailed Description

template<typename Type, typename Value = double>
class boost::probabilities::truncating_validator< Type, Value >

Truncating validator.

This class models the ValidatorConcept and ensures that values are within range. Additionally, values outside of the range but within epsilon of the boundaries are truncated to the appropriate boundary. This is to handle the corner cases that might occur due to floating point round-off errors, even when operating on well-defined values of likelihood or probability.


Member Function Documentation

template<typename Type, typename Value = double>
static value_type boost::probabilities::truncating_validator< Type, Value >::epsilon value_type  epsilon  )  [inline, static]
 

Set the tolerance imposed on the boundaries.

Set the tolerance imposed on the boundaries and return the previous tolerance. Due to round-off errors, floating point values outside this range may result, even when operating on well-defined value of likelihood or probability. Small deviations (e.g., determined by epsilon) are tolerated and truncated to the appropriate extreme.

template<typename Type, typename Value = double>
static value_type boost::probabilities::truncating_validator< Type, Value >::epsilon  )  [inline, static]
 

Inspect the tolerance imposed on the boundaries.

Due to round-off errors, floating point values outside this range may result, even when operating on well-defined values of likelihood or probability. Small deviations (e.g., determined by epsilon) are tolerated and truncated to the appropriate extreme.


The documentation for this class was generated from the following file:
Generated on Thu Oct 18 11:10:29 2007 for Boost.Probability: C++ Probability and Likelihood Library by  doxygen 1.4.5