Struct tdigest_ch::TDigestBuilder
source · pub struct TDigestBuilder { /* private fields */ }
Expand description
A TDigestBuilder
can be used to create a TDigest
with custom
configuration.
§Examples
use tdigest_ch::TDigestBuilder;
let mut builder = TDigestBuilder::new();
builder.max_centroids(1024);
builder.max_unmerged(1024);
let digest = builder.build();
Implementations§
source§impl TDigestBuilder
impl TDigestBuilder
sourcepub fn epsilon(&mut self, epsilon: f32) -> &mut Self
pub fn epsilon(&mut self, epsilon: f32) -> &mut Self
Sets the compression parameter of the TDigest
. Defaults to 0.01.
sourcepub fn max_centroids(&mut self, max_centroids: usize) -> &mut Self
pub fn max_centroids(&mut self, max_centroids: usize) -> &mut Self
Sets the maximum number of centroids that the TDigest
will store.
Defaults to 2048.
sourcepub fn max_unmerged(&mut self, max_unmerged: usize) -> &mut Self
pub fn max_unmerged(&mut self, max_unmerged: usize) -> &mut Self
Sets the maximum number of unmerged centroids that the TDigest
will
store. Defaults to 2048.
Trait Implementations§
source§impl Debug for TDigestBuilder
impl Debug for TDigestBuilder
Auto Trait Implementations§
impl Freeze for TDigestBuilder
impl RefUnwindSafe for TDigestBuilder
impl Send for TDigestBuilder
impl Sync for TDigestBuilder
impl Unpin for TDigestBuilder
impl UnwindSafe for TDigestBuilder
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