use russell_stat::*;
fn main() -> Result<(), StrError> {
let mut rng = get_rng();
let dist = DistributionNormal::new(0.0, 1.0)?;
let nsamples = 10_000;
let mut data = vec![0.0; nsamples];
for i in 0..nsamples {
data[i] = dist.sample(&mut rng);
}
println!("{}", Statistics::new(&data));
let stations = (0..20).map(|i| -4.0 + (i as f64) * 0.5).collect::<Vec<f64>>();
let mut hist = Histogram::new(&stations)?;
hist.set_bar_char('🍕').set_bar_max_len(30);
hist.count(&data);
println!("{:.2}", hist);
Ok(())
}