Enum spectrum_analyzer::FrequencyLimit [−][src]
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
Interested in all frequencies. [0, sampling_rate/2] (Nyquist theorem). Semantically equivalent to “None” limit at all).
Only interested in frequencies Frequency <= x
. Limit is inclusive.
Supported values are 0 <= x <= Nyquist-Frequency
.
Only interested in frequencies x <= Frequency
. Limit is inclusive.
Supported values are 0 <= x <= N
.
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
Returns the minimum value, panics if it’s none.
Unwrapped version of Self::maybe_min
.
Returns the minimum value, panics if it’s none.
Unwrapped version of Self::maybe_max
.
Verifies that the frequency limit has sane values and takes the maximum possible frequency into account.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FrequencyLimit
impl Send for FrequencyLimit
impl Sync for FrequencyLimit
impl Unpin for FrequencyLimit
impl UnwindSafe for FrequencyLimit
Blanket Implementations
Mutably borrows from an owned value. Read more