use crate::*;
pub struct Cyclotomic<const N: usize, T> {
pub coefficients: [T; N],
}
impl<const N: usize, C, T: ClosedAddDyn<C>> ClosedAddDyn<C> for Cyclotomic<N, T> {
fn add_d(&self, rhs: &Self, ctx: &C) -> Self {
Self {
coefficients: std::array::from_fn(|i| {
self.coefficients[i].add_d(&rhs.coefficients[i], ctx)
}),
}
}
}
impl<const N: usize, T: ClosedAdd> ClosedAdd for Cyclotomic<N, T> {}