pub fn bitwise_transform<T, F>(x: &mut [T], f: F)
Examples found in repository?
crates/competitive/src/math/bitwiseand_convolve.rs (line 14)
13 pub fn zeta_transform(f: &mut [M::T]) {
14 bitwise_transform(f, |x, y| *x = M::operate(x, y));
15 }
16}
17
18impl<G> BitwiseandConvolve<G>
19where
20 G: Group,
21{
22 /// $$f(m) = \sum_{n \mid m}h(n)$$
23 pub fn mobius_transform(f: &mut [G::T]) {
24 bitwise_transform(f, |x, y| *x = G::rinv_operate(x, y));
25 }
More examples
crates/competitive/src/math/bitwiseor_convolve.rs (line 14)
13 pub fn zeta_transform(f: &mut [M::T]) {
14 bitwise_transform(f, |y, x| *x = M::operate(x, y));
15 }
16}
17
18impl<G> BitwiseorConvolve<G>
19where
20 G: Group,
21{
22 /// $$f(m) = \sum_{n \mid m}h(n)$$
23 pub fn mobius_transform(f: &mut [G::T]) {
24 bitwise_transform(f, |y, x| *x = G::rinv_operate(x, y));
25 }