Skip to content

Commit 9daef2c

Browse files
committed
Add missing file
1 parent 5d6d67b commit 9daef2c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/traits.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// Estimate a statistic of a sequence of numbers ("population").
2+
pub trait Estimate {
3+
/// Add an observation sampled from the population.
4+
fn add(&mut self, x: f64);
5+
6+
/// Estimate the statistic of the population.
7+
fn estimate(&self) -> f64;
8+
}
9+
10+
/// Merge another sample into this one.
11+
pub trait Merge {
12+
fn merge(&mut self, other: &Self);
13+
}

0 commit comments

Comments
 (0)