Fix warnings

This commit is contained in:
2022-04-26 22:42:46 +02:00
parent 6f90aa8170
commit 6f91c0a765
3 changed files with 5 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ pub(crate) struct Core {
pub indices: Vec<usize>,
pub ns_cav: Vec<f64>,
pub xs_cav: Vec<f64>,
pub t: f64,
pub _t: f64,
pub logpart: f64,
pub exp_ll: f64,
}
@@ -49,7 +49,7 @@ impl Core {
.collect(),
ns_cav: (0..elems.len()).map(|_| 0.0).collect(),
xs_cav: (0..elems.len()).map(|_| 0.0).collect(),
t,
_t: t,
logpart: 0.0,
exp_ll: 0.0,
}

View File

@@ -22,6 +22,7 @@ pub trait Storage {
}
*/
#[derive(Default)]
pub struct Storage {
keys: HashMap<String, usize>,
items: Vec<Item>,
@@ -67,12 +68,3 @@ impl Storage {
self.keys.keys()
}
}
impl Default for Storage {
fn default() -> Self {
Self {
keys: HashMap::new(),
items: Vec::new(),
}
}
}

View File

@@ -88,6 +88,7 @@ pub fn logphi(z: f64) -> (f64, f64) {
}
}
/*
pub fn logsumexp2(xs: &[f64], bs: &[f64]) -> f64 {
let a = xs.iter().max_by(|a, b| a.partial_cmp(b).unwrap()).unwrap();
@@ -98,6 +99,7 @@ pub fn logsumexp2(xs: &[f64], bs: &[f64]) -> f64 {
.sum::<f64>()
.ln()
}
*/
pub const ROOTS_HERMITENORM_XS: [f64; 30] = [
-9.706236,