Struct sketches_ddsketch::Config
source · pub struct Config {
pub max_num_bins: u32,
pub gamma: f64,
pub offset: i32,
/* private fields */
}
Expand description
The configuration struct for constructing a DDSketch
Fields§
§max_num_bins: u32
§gamma: f64
§offset: i32
Implementations§
source§impl Config
impl Config
sourcepub fn new(alpha: f64, max_num_bins: u32, min_value: f64) -> Self
pub fn new(alpha: f64, max_num_bins: u32, min_value: f64) -> Self
Construct a new Config
struct with specific parameters. If you are unsure of how to
configure this, the defaults
method constructs a Config
with built-in defaults.
max_num_bins
is the max number of bins the DDSketch will grow to, in steps of 128 bins.
pub fn key(&self, v: f64) -> i32
pub fn value(&self, key: i32) -> f64
pub fn log_gamma(&self, value: f64) -> f64
pub fn pow_gamma(&self, key: i32) -> f64
pub fn min_possible(&self) -> f64
Trait Implementations§
source§impl PartialEq for Config
impl PartialEq for Config
impl Copy for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more