datasketches-cpp
Static Public Member Functions | List of all members
bounds_on_ratios_in_theta_sketched_sets< ExtractKey > Class Template Reference

Bounds on ratios in Theta sketched sets. More...

#include <bounds_on_ratios_in_theta_sketched_sets.hpp>

Static Public Member Functions

template<typename SketchA , typename SketchB >
static double lower_bound_for_b_over_a (const SketchA &sketch_a, const SketchB &sketch_b)
 Gets the approximate lower bound for B over A based on a 95% confidence interval. More...
 
template<typename SketchA , typename SketchB >
static double upper_bound_for_b_over_a (const SketchA &sketch_a, const SketchB &sketch_b)
 Gets the approximate upper bound for B over A based on a 95% confidence interval. More...
 
template<typename SketchA , typename SketchB >
static double estimate_of_b_over_a (const SketchA &sketch_a, const SketchB &sketch_b)
 Gets the estimate for B over A. More...
 

Detailed Description

template<typename ExtractKey>
class datasketches::bounds_on_ratios_in_theta_sketched_sets< ExtractKey >

Bounds on ratios in Theta sketched sets.

This is to compute the bounds on the estimate of the ratio B / A, where:

Note: The theta of A cannot be greater than the theta of B. If B is formed as an intersection of A and some other set C, then the theta of B is guaranteed to be less than or equal to the theta of B.

Member Function Documentation

◆ lower_bound_for_b_over_a()

static double lower_bound_for_b_over_a ( const SketchA &  sketch_a,
const SketchB &  sketch_b 
)
inlinestatic

Gets the approximate lower bound for B over A based on a 95% confidence interval.

Parameters
sketch_athe sketch A
sketch_bthe sketch B
Returns
the approximate lower bound for B over A

◆ upper_bound_for_b_over_a()

static double upper_bound_for_b_over_a ( const SketchA &  sketch_a,
const SketchB &  sketch_b 
)
inlinestatic

Gets the approximate upper bound for B over A based on a 95% confidence interval.

Parameters
sketch_athe sketch A
sketch_bthe sketch B
Returns
the approximate upper bound for B over A

◆ estimate_of_b_over_a()

static double estimate_of_b_over_a ( const SketchA &  sketch_a,
const SketchB &  sketch_b 
)
inlinestatic

Gets the estimate for B over A.

Parameters
sketch_athe sketch A
sketch_bthe sketch B
Returns
the estimate for B over A

The documentation for this class was generated from the following file: