Type Definition spectrum_analyzer::SpectrumTotalScaleFunctionFactory[][src]

type SpectrumTotalScaleFunctionFactory = Box<dyn Fn(f32, f32, f32, f32) -> Box<dyn Fn(f32) -> f32>>;

Describes the type for a function factory that generates a function that can scale/normalize the data inside FrequencySpectrum. This can be used to subtract min value from all values for example , if min is > 0. The signature is the following: (min: f32, max: f32, average: f32, median: f32) -> fn(f32) -> f32 i.e. you provide a function which generates a function that gets applied to each element.