Skip to main content

hadamard_transform

Function hadamard_transform 

Source
pub fn hadamard_transform(x: &mut [f32]) -> Result<(), NotPowerOfTwo>
Expand description

Implicitly multiply the argument x by a Hadamard matrix and scale the results by 1 / x.len().sqrt().

This function does not allocate and operates in place.

§Error

Returns an error if x.len() is not a power of two.

§See Also