pub struct DigramAnalysis {
pub chi2_a: f64,
pub chi2_b: f64,
pub sufficient_data: bool,
pub min_sample_bytes: usize,
}Expand description
Digram (byte bigram) chi-squared uniformity.
Trigrams are intentionally omitted: hashing 16M possible trigrams into fewer bins produces systematic chi-squared bias from hash collisions, making the statistic unreliable. Digrams with 65536 exact bins are sound when the sample has >= ~320KB (expected count >= 5 per bin).
Fields§
§chi2_a: f64Chi-squared statistic for digram uniformity, or NaN if insufficient data.
chi2_b: f64Chi-squared statistic for digram uniformity, or NaN if insufficient data.
sufficient_data: boolWhether the sample was large enough for the chi-squared approximation.
min_sample_bytes: usizeMinimum sample size needed (bytes) for expected >= 5 per bin.
Trait Implementations§
Source§impl Clone for DigramAnalysis
impl Clone for DigramAnalysis
Source§fn clone(&self) -> DigramAnalysis
fn clone(&self) -> DigramAnalysis
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DigramAnalysis
impl Debug for DigramAnalysis
Auto Trait Implementations§
impl Freeze for DigramAnalysis
impl RefUnwindSafe for DigramAnalysis
impl Send for DigramAnalysis
impl Sync for DigramAnalysis
impl Unpin for DigramAnalysis
impl UnsafeUnpin for DigramAnalysis
impl UnwindSafe for DigramAnalysis
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