pub struct FFTPlan<F> {
pub size: usize,
pub algorithm: FFTAlgorithm,
pub twiddle_factors: Vec<Complex<F>>,
pub bit_reversal: Vec<usize>,
pub real_input: bool,
}
Expand description
FFT planning and execution context
Fields§
§size: usize
Size of the transform
algorithm: FFTAlgorithm
Algorithm to use
twiddle_factors: Vec<Complex<F>>
Precomputed twiddle factors
bit_reversal: Vec<usize>
Bit-reversal permutation indices
real_input: bool
Whether this is for real input (RFFT)
Implementations§
Source§impl<F> FFTPlan<F>where
F: Float + FloatConst,
impl<F> FFTPlan<F>where
F: Float + FloatConst,
Sourcepub fn new(
size: usize,
algorithm: FFTAlgorithm,
realinput: bool,
) -> LinalgResult<Self>
pub fn new( size: usize, algorithm: FFTAlgorithm, realinput: bool, ) -> LinalgResult<Self>
Create a new FFT plan for the given size
§Arguments
size
- Transform sizealgorithm
- FFT algorithm to usereal_input
- Whether input is real-valued
§Returns
- FFT plan ready for execution
§Examples
use scirs2_linalg::fft::{FFTPlan, FFTAlgorithm};
let plan = FFTPlan::<f64>::new(1024, FFTAlgorithm::CooleyTukey, false).unwrap();
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for FFTPlan<F>
impl<F> RefUnwindSafe for FFTPlan<F>where
F: RefUnwindSafe,
impl<F> Send for FFTPlan<F>where
F: Send,
impl<F> Sync for FFTPlan<F>where
F: Sync,
impl<F> Unpin for FFTPlan<F>where
F: Unpin,
impl<F> UnwindSafe for FFTPlan<F>where
F: UnwindSafe,
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> 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