We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would you accept a PR for helpers to handle half-complex arrays. I'm thinking for half-complex arrays x, y,
x * y
mod(x)
abs(x)
arg(x)
phase(x)
the signature could be e.g.
/// contents of y are replaced with the result fn half_complex_mult<X>(x: &[X], y: &mut [X]) where X: f32 or f64 // (either define a trait or 2 functions) { assert_eq!(x.len(), y.len()); let n = x.len(); y[0] = y[0] * x[0]; for i in 1..=(n - 1) / 2 { let xre = x[i]; let yre = y[i]; let xim = x[n - i]; let yim = y[n - i]; y[i] = xre * yre - xim * yim; y[n - i] = xre * yim + xre * yim; } if n % 2 == 0 { let n2 = n / 2; y[n2] = y[n2] * x[n2]; } }
The text was updated successfully, but these errors were encountered:
These kinds of routines are fiddly to write and prone to errors. Centralising them improves robustness.
Sorry, something went wrong.
No branches or pull requests
Would you accept a PR for helpers to handle half-complex arrays. I'm thinking for half-complex arrays x, y,
x * y
mod(x)
orabs(x)
arg(x)
(orphase(x)
if preferred)the signature could be e.g.
The text was updated successfully, but these errors were encountered: