use crate::{
real_irregular_solid_sh, real_regular_solid_sh, real_sh_hardcoded, SHCoordinates, SHEval,
SphrsFloat,
};
#[derive(Clone, Copy)]
pub enum RealSH {
Spherical,
RegularSolid,
IrregularSolid,
}
impl<T> SHEval<T> for RealSH
where
T: SphrsFloat,
{
type Output = T;
#[inline(always)]
fn eval(&self, l: i64, m: i64, p: &impl SHCoordinates<T>) -> Self::Output {
assert!(m.abs() <= l);
match self {
Self::Spherical => real_sh_hardcoded(l, m, p),
Self::RegularSolid => real_regular_solid_sh(l, m, p),
Self::IrregularSolid => real_irregular_solid_sh(l, m, p),
}
}
}