use crate::config::*;
use strum::IntoEnumIterator;
use strum_macros::{Display, EnumIter, EnumMessage};
#[cfg_attr(feature = "python-bindings", pyclass(eq, eq_int))]
#[derive(Copy, Display, Debug, EnumMessage, Default, Clone, PartialEq, EnumIter)]
pub enum FreqWeighting {
A,
C,
#[default]
Z,
}
#[cfg(feature = "python-bindings")]
#[cfg_attr(feature = "python-bindings", pymethods)]
impl FreqWeighting {
#[staticmethod]
fn all() -> Vec<Self> {
Self::iter().collect()
}
fn __str__(&self) -> String {
format!("{self}-weighting")
}
fn letter(&self) -> String {
format!("{self}")
}
#[staticmethod]
#[pyo3(name = "default")]
fn default_py() -> Self {
Self::default()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test() {
let a = FreqWeighting::A;
let c = FreqWeighting::C;
let z = FreqWeighting::Z;
println!("A-weighting: {a}");
println!("C-weighting: {c}");
println!("Z-weighting: {z}");
}
}