pub enum FrequencyLimit {
All,
Min(f32),
Max(f32),
Range(f32, f32),
}Expand description
Can be used to specify a desired frequency limit.
If you know that you only need frequencies f <= 1000Hz,
1000 <= f <= 6777, or 10000 <= f, then this can help you to accelerate
overall computation speed and memory usage.
Please note that due to frequency inaccuracies the FFT result may not contain
a value for 1000Hz but for 998.76Hz!
Variants§
All
Interested in all frequencies. [0, sampling_rate/2] (Nyquist theorem). Semantically equivalent to “None” limit at all).
Min(f32)
Only interested in frequencies Frequency <= x. Limit is inclusive.
Supported values are 0 <= x <= Nyquist-Frequency.
Max(f32)
Only interested in frequencies x <= Frequency. Limit is inclusive.
Supported values are 0 <= x <= N.
Range(f32, f32)
Only interested in frequencies 1000 <= f <= 6777 for example. Both values are inclusive.
The first value of the tuple is equivalent to FrequencyLimit::Min and the latter
equivalent to FrequencyLimit::Max. Furthermore, the first value must not be
bigger than the second value.
Implementations§
Source§impl FrequencyLimit
impl FrequencyLimit
Sourcepub fn min(&self) -> f32
pub fn min(&self) -> f32
Returns the minimum value, panics if it’s none.
Unwrapped version of Self::maybe_min.
Sourcepub fn max(&self) -> f32
pub fn max(&self) -> f32
Returns the minimum value, panics if it’s none.
Unwrapped version of Self::maybe_max.
Trait Implementations§
Source§impl Clone for FrequencyLimit
impl Clone for FrequencyLimit
Source§fn clone(&self) -> FrequencyLimit
fn clone(&self) -> FrequencyLimit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more