pub struct SplitPlan<T: Float> { /* private fields */ }Expand description
A plan for split-complex format (separate real and imaginary arrays).
Split-complex format stores the real parts in one array and the imaginary parts in another, rather than interleaving them:
- Interleaved:
[re0, im0, re1, im1, re2, im2, ...] - Split:
real = [re0, re1, re2, ...],imag = [im0, im1, im2, ...]
This format can be more efficient for SIMD processing and is used by some numerical libraries.
§Example
ⓘ
use oxifft::{SplitPlan, Direction, Flags};
let n = 256;
let plan = SplitPlan::<f64>::dft_1d(n, Direction::Forward, Flags::ESTIMATE).unwrap();
let mut in_real = vec![0.0; n];
let mut in_imag = vec![0.0; n];
let mut out_real = vec![0.0; n];
let mut out_imag = vec![0.0; n];
// Initialize input...
in_real[0] = 1.0;
plan.execute(&in_real, &in_imag, &mut out_real, &mut out_imag);Implementations§
Source§impl<T: Float> SplitPlan<T>
impl<T: Float> SplitPlan<T>
Sourcepub fn dft_1d(n: usize, direction: Direction, flags: Flags) -> Option<Self>
pub fn dft_1d(n: usize, direction: Direction, flags: Flags) -> Option<Self>
Create a 1D DFT plan for split-complex format.
§Arguments
n- Transform sizedirection- Forward or Backwardflags- Planning flags
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SplitPlan<T>
impl<T> RefUnwindSafe for SplitPlan<T>where
T: RefUnwindSafe,
impl<T> Send for SplitPlan<T>
impl<T> Sync for SplitPlan<T>
impl<T> Unpin for SplitPlan<T>
impl<T> UnsafeUnpin for SplitPlan<T>
impl<T> UnwindSafe for SplitPlan<T>where
T: 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