pub struct StarStats {
pub n_blocks: usize,
pub n_simple_blocks: usize,
pub n_loop_blocks: usize,
pub total_loop_rows: usize,
pub total_loop_cols: usize,
pub total_simple_entries: usize,
pub block_stats: Vec<(String, DataBlockStats)>,
}Expand description
Comprehensive statistics for a STAR file
Fields§
§n_blocks: usizeTotal number of data blocks
n_simple_blocks: usizeNumber of SimpleBlock data blocks
n_loop_blocks: usizeNumber of LoopBlock data blocks
total_loop_rows: usizeTotal number of rows across all LoopBlocks
total_loop_cols: usizeTotal number of columns across all LoopBlocks (sum of each block’s columns)
total_simple_entries: usizeTotal number of entries across all SimpleBlocks
block_stats: Vec<(String, DataBlockStats)>Statistics per block (block name -> stats)
Implementations§
Source§impl StarStats
impl StarStats
Sourcepub fn from_blocks(blocks: &HashMap<String, DataBlock>) -> Self
pub fn from_blocks(blocks: &HashMap<String, DataBlock>) -> Self
Create a new StarStats from a HashMap of data blocks
Sourcepub fn get_block_stats(&self, name: &str) -> Option<DataBlockStats>
pub fn get_block_stats(&self, name: &str) -> Option<DataBlockStats>
Get statistics for a specific block by name
Sourcepub fn has_loop_blocks(&self) -> bool
pub fn has_loop_blocks(&self) -> bool
Returns true if the file contains any LoopBlocks
Sourcepub fn has_simple_blocks(&self) -> bool
pub fn has_simple_blocks(&self) -> bool
Returns true if the file contains any SimpleBlocks
Trait Implementations§
impl StructuralPartialEq for StarStats
Auto Trait Implementations§
impl Freeze for StarStats
impl RefUnwindSafe for StarStats
impl Send for StarStats
impl Sync for StarStats
impl Unpin for StarStats
impl UnsafeUnpin for StarStats
impl UnwindSafe for StarStats
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