Struct sketches_ddsketch::Config
source · [−]Expand description
The configuration struct for constructing a DDSketch
Fields
max_num_bins: u32
gamma: f64
offset: i32
Implementations
sourceimpl 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 log_gamma(&self, value: f64) -> f64
pub fn pow_gamma(&self, k: i32) -> f64
Trait Implementations
impl Copy for Config
impl StructuralPartialEq for Config
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more