#[non_exhaustive]pub struct FftOptions {
pub n: Option<usize>,
pub axis: isize,
pub norm: FftNorm,
}Expand description
Options of the one-axis transforms fft, ifft, rfft and irfft.
n: transform length alongaxis; the input is cropped or zero-padded to it (forirfft, the length of the real output).Nonekeeps the input length (forirfft,2 * (m - 1)).axis: the transformed axis; negative values count from the end. The default is-1, the last axis.norm: the normalization; the default isFftNorm::Backward.
The in-place transforms (fft_in_place, ifft_in_place) cannot change
the length, so they reject n: Some(_) with a validation error.
§Examples
use tenferro_fft::{FftNorm, FftOptions};
let opts = FftOptions::default();
assert_eq!((opts.n, opts.axis, opts.norm), (None, -1, FftNorm::Backward));
let opts = FftOptions::default().n(Some(8)).axis(0).norm(FftNorm::Ortho);
assert_eq!((opts.n, opts.axis, opts.norm), (Some(8), 0, FftNorm::Ortho));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.n: Option<usize>Transform length along axis; None keeps the input length.
axis: isizeThe transformed axis; negative values count from the end.
norm: FftNormThe normalization.
Implementations§
Source§impl FftOptions
impl FftOptions
Sourcepub fn n(self, n: Option<usize>) -> Self
pub fn n(self, n: Option<usize>) -> Self
Return options with the requested transform length.
§Examples
use tenferro_fft::FftOptions;
assert_eq!(FftOptions::default().n(Some(4)).n, Some(4));Trait Implementations§
Source§impl Clone for FftOptions
impl Clone for FftOptions
impl Copy for FftOptions
Source§impl Debug for FftOptions
impl Debug for FftOptions
Source§impl Default for FftOptions
impl Default for FftOptions
impl Eq for FftOptions
Source§impl PartialEq for FftOptions
impl PartialEq for FftOptions
impl StructuralPartialEq for FftOptions
Auto Trait Implementations§
impl Freeze for FftOptions
impl RefUnwindSafe for FftOptions
impl Send for FftOptions
impl Sync for FftOptions
impl Unpin for FftOptions
impl UnsafeUnpin for FftOptions
impl UnwindSafe for FftOptions
Blanket Implementations§
impl<T> Boilerplate for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more