| Home | Libraries | People | FAQ | More

## Class template binomial_proportion_interval

boost::histogram::utility::binomial_proportion_interval — Common base class for interval calculators.

## Synopsis

    // In header: <boost/histogram/utility/binomial_proportion_interval.hpp>

    template<typename ValueType>
    class binomial_proportion_interval {
    public:
      // types
      typedef ValueType                           value_type;
      typedef std::pair< value_type, value_type > interval_type;

      // public member functions
      virtual interval_type operator()(value_type, value_type) const = 0;
      template<typename T>
        interval_type
        operator()(const accumulators::fraction< T > &) const noexcept;
    };

## Description

### `binomial_proportion_interval` public member functions

1.     virtual interval_type
       operator()(value_type successes, value_type failures) const = 0;

   Compute interval for given number of successes and failures.

   Parameters: |
   `successes` | Number of successful trials.
   `failures` | Number of failed trials.

2.     template<typename T>
         interval_type
         operator()(const accumulators::fraction< T > & fraction) const noexcept;

   Compute interval for a fraction accumulator.

   Parameters: |
   `fraction` | Fraction accumulator.