Skip to content

Commit

Permalink
remove benches, reduce dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Jan 12, 2024
1 parent 653f179 commit 95e1ba9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 33 deletions.
7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ num-complex = { version = "0.4.0", features = ["serde"], default-features = fals
num-traits = { version = "0.2.14", features = ["libm"], default-features = false}

[dev-dependencies]
easybench = "1.0"
rand = "0.8"
ndarray = "0.15"
rustfft = "6.1.0"
iai-callgrind = "0.10.0"
# futuredsp = "0.0.6"
# sdr = "0.7.0"

[[bench]]
name = "micro"
harness = false

[profile.release]
debug = 1
19 changes: 0 additions & 19 deletions benches/micro.rs

This file was deleted.

11 changes: 4 additions & 7 deletions src/rpll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ impl RPLL {
#[cfg(test)]
mod test {
use super::RPLL;
use ndarray::prelude::*;
use rand::{prelude::*, rngs::StdRng};
use std::vec::Vec;

Expand Down Expand Up @@ -175,14 +174,12 @@ mod test {
self.run(t_settle);

let (y, f) = self.run(n);
let y = Array::from(y);
let f = Array::from(f);
// println!("{:?} {:?}", f, y);

let fm = f.mean().unwrap();
let fs = f.std_axis(Axis(0), 0.).into_scalar();
let ym = y.mean().unwrap();
let ys = y.std_axis(Axis(0), 0.).into_scalar();
let fm = f.iter().copied().sum::<f32>() / f.len() as f32;
let fs = f.iter().map(|f| (*f - fm).powi(2)).sum::<f32>().sqrt() / f.len() as f32;
let ym = y.iter().copied().sum::<f32>() / y.len() as f32;
let ys = y.iter().map(|y| (*y - ym).powi(2)).sum::<f32>().sqrt() / y.len() as f32;

println!("f: {:.2e}±{:.2e}; y: {:.2e}±{:.2e}", fm, fs, ym, ys);

Expand Down

0 comments on commit 95e1ba9

Please sign in to comment.