pub trait ConvolveSteps {
type T;
type F;
// Required methods
fn length(t: &Self::T) -> usize;
fn transform(t: Self::T, len: usize) -> Self::F;
fn inverse_transform(f: Self::F, len: usize) -> Self::T;
fn multiply(f: &mut Self::F, g: &Self::F);
// Provided method
fn convolve(a: Self::T, b: Self::T) -> Self::T { ... }
}Required Associated Types§
Required Methods§
fn length(t: &Self::T) -> usize
fn transform(t: Self::T, len: usize) -> Self::F
fn inverse_transform(f: Self::F, len: usize) -> Self::T
fn multiply(f: &mut Self::F, g: &Self::F)
Provided Methods§
Sourcefn convolve(a: Self::T, b: Self::T) -> Self::T
fn convolve(a: Self::T, b: Self::T) -> Self::T
Examples found in repository?
More examples
Additional examples can be found in:
- crates/library_checker/src/convolution/bitwise_and_convolution.rs
- crates/library_checker/src/convolution/bitwise_xor_convolution.rs
- crates/library_checker/src/convolution/gcd_convolution.rs
- crates/library_checker/src/convolution/lcm_convolution.rs
- crates/competitive/src/tree/centroid_decomposition.rs
- crates/competitive/src/math/number_theoretic_transform.rs
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.