pub struct ContextStatistics {
pub total_contexts: usize,
pub total_transitions: usize,
pub total_entropy: f64,
pub avg_entropy: f64,
pub avg_frequency: f64,
pub min_frequency: usize,
pub max_frequency: usize,
pub min_entropy: f64,
pub max_entropy: f64,
pub contexts_by_order: HashMap<usize, usize>,
pub transitions_by_context: HashMap<usize, usize>,
}Expand description
Statistics about context tree structure and usage
Fields§
§total_contexts: usizeTotal number of contexts
total_transitions: usizeTotal number of transitions across all contexts
total_entropy: f64Sum of entropy across all contexts
avg_entropy: f64Average entropy per context
avg_frequency: f64Average frequency per context
min_frequency: usizeMinimum frequency observed
max_frequency: usizeMaximum frequency observed
min_entropy: f64Minimum entropy observed
max_entropy: f64Maximum entropy observed
contexts_by_order: HashMap<usize, usize>Number of contexts by order
transitions_by_context: HashMap<usize, usize>Number of unique transitions by context order
Implementations§
Source§impl ContextStatistics
impl ContextStatistics
Sourcepub fn memory_efficiency(&self, memory_bytes: usize) -> f64
pub fn memory_efficiency(&self, memory_bytes: usize) -> f64
Get memory efficiency (contexts per MB)
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Get compression ratio (transitions per context)
Trait Implementations§
Source§impl Clone for ContextStatistics
impl Clone for ContextStatistics
Source§fn clone(&self) -> ContextStatistics
fn clone(&self) -> ContextStatistics
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 ContextStatistics
impl Debug for ContextStatistics
Auto Trait Implementations§
impl Freeze for ContextStatistics
impl RefUnwindSafe for ContextStatistics
impl Send for ContextStatistics
impl Sync for ContextStatistics
impl Unpin for ContextStatistics
impl UnwindSafe for ContextStatistics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more