haar_lib/num/const_modint/
algebra.rs1pub use crate::algebra::traits::*;
4pub use crate::algebra::{prod::Prod, sum::Sum};
5use crate::{impl_algebra, num::const_modint::ConstModInt};
6
7impl_algebra!(
8 [const M: u32]; Sum<ConstModInt<M>>;
9 op: |a: Self, b: Self| Self(a.0 + b.0);
10 id: Self(ConstModInt::new(0));
11 inv: |a: Self| Self(-a.0);
12 assoc;
13 commu;
14);
15
16impl_algebra!(
17 [const M: u32]; Prod<ConstModInt<M>>;
18 op: |a: Self, b: Self| Self(a.0 * b.0);
19 id: Self(ConstModInt::new(1));
20 assoc;
21 commu;
22);