#[non_exhaustive]pub struct FftnOptions {
pub shape: Option<Vec<usize>>,
pub axes: Vec<isize>,
pub norm: FftNorm,
}Expand description
Options of the N-dimensional transforms fftn, ifftn, rfftn and
irfftn.
shape: one transform length per transformed axis (forirfftn, the real output lengths);Nonekeeps the input lengths.axes: the transformed axes; negative values count from the end. Empty (the default) follows NumPy: every axis whenshapeisNone, otherwise the lastshape.len()axes. For the real transforms the last listed axis is the real axis.norm: the normalization, applied once to the whole transform.
§Examples
use tenferro_fft::{FftNorm, FftnOptions};
let opts = FftnOptions::default();
assert!(opts.shape.is_none() && opts.axes.is_empty());
assert_eq!(opts.norm, FftNorm::Backward);
let opts = FftnOptions::default().axes(vec![0, -1]).shape(Some(vec![4, 4]));
assert_eq!(opts.axes, vec![0, -1]);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.shape: Option<Vec<usize>>One transform length per transformed axis; None keeps the input lengths.
axes: Vec<isize>The transformed axes; empty selects them as NumPy does.
norm: FftNormThe normalization.
Implementations§
Source§impl FftnOptions
impl FftnOptions
Sourcepub fn shape(self, shape: Option<Vec<usize>>) -> Self
pub fn shape(self, shape: Option<Vec<usize>>) -> Self
Return options with the requested transform lengths.
§Examples
use tenferro_fft::FftnOptions;
assert_eq!(FftnOptions::default().shape(Some(vec![2, 2])).shape, Some(vec![2, 2]));Trait Implementations§
Source§impl Clone for FftnOptions
impl Clone for FftnOptions
Source§impl Debug for FftnOptions
impl Debug for FftnOptions
Source§impl Default for FftnOptions
impl Default for FftnOptions
impl Eq for FftnOptions
Source§impl PartialEq for FftnOptions
impl PartialEq for FftnOptions
impl StructuralPartialEq for FftnOptions
Auto Trait Implementations§
impl Freeze for FftnOptions
impl RefUnwindSafe for FftnOptions
impl Send for FftnOptions
impl Sync for FftnOptions
impl Unpin for FftnOptions
impl UnsafeUnpin for FftnOptions
impl UnwindSafe for FftnOptions
Blanket Implementations§
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