Skip to content

Commit 226d7ce

Browse files
committed
feat: add pub accessors mu(), sigma(), observations() to Cascade
Consumers (bgz-tensor) need read access to Welford σ tracking state for quarter-sigma band computation. Fields remain private; accessors provide read-only access. https://claude.ai/code/session_01ChLvBfpJS8dQhHxRD4pYNp
1 parent 4fdce79 commit 226d7ce

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/hpc/cascade.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ pub struct Cascade {
9797
}
9898

9999
impl Cascade {
100+
/// Current distribution mean (Welford online estimate).
101+
pub fn mu(&self) -> f64 { self.mu }
102+
103+
/// Current distribution standard deviation (Welford online estimate).
104+
pub fn sigma(&self) -> f64 { self.sigma }
105+
106+
/// Number of observations processed.
107+
pub fn observations(&self) -> usize { self.observations }
108+
100109
pub fn from_threshold(threshold: u64, vec_bytes: usize) -> Self {
101110
Self { threshold, vec_bytes, mu: 0.0, sigma: 0.0, observations: 0 }
102111
}

0 commit comments

Comments
 (0)