pub struct PowerDelayProfile { /* private fields */ }Expand description
A power-delay profile on the sampling grid of the OFDM symbol: checked when it is built, its fields read through getters.
Implementations§
Source§impl PowerDelayProfile
impl PowerDelayProfile
Sourcepub fn new(
delays: Vec<f64>,
powers: &[f64],
n_fft: usize,
) -> Result<PowerDelayProfile>
pub fn new( delays: Vec<f64>, powers: &[f64], n_fft: usize, ) -> Result<PowerDelayProfile>
A profile from delays (samples of the IFFT of size n_fft) and linear powers,
normalised to a unit sum.
§Errors
Error::Shape for as many delays as powers; Error::Config for no tap, a
zero FFT size, a negative or non-finite delay or power, or powers of zero sum.
§Examples
use comnum_waveform::ofdm::estimation::PowerDelayProfile;
let p = PowerDelayProfile::new(vec![0.0, 3.0], &[3.0, 1.0], 64)?;
assert_eq!(p.powers(), &[0.75, 0.25]);
assert!(PowerDelayProfile::new(vec![0.0], &[1.0, 1.0], 64).is_err());
assert!(PowerDelayProfile::new(vec![0.0], &[0.0], 64).is_err());Sourcepub fn uniform(max_delay: usize, n_fft: usize) -> Result<PowerDelayProfile>
pub fn uniform(max_delay: usize, n_fft: usize) -> Result<PowerDelayProfile>
The uniform profile over max_delay samples (the robust design: the cyclic
prefix; one tap at least).
§Errors
Error::Config for a zero FFT size.
Sourcepub fn delays(&self) -> &[f64]
pub fn delays(&self) -> &[f64]
The delays (samples of the IFFT of size PowerDelayProfile::n_fft).
Sourcepub fn correlation(&self, delta: f64) -> C64
pub fn correlation(&self, delta: f64) -> C64
$R(\Delta k)$ between subcarriers $\Delta k$ apart
(comnum_dsp::estimation::frequency_correlation).
Trait Implementations§
Source§impl Clone for PowerDelayProfile
impl Clone for PowerDelayProfile
Source§impl Debug for PowerDelayProfile
impl Debug for PowerDelayProfile
Source§impl PartialEq for PowerDelayProfile
impl PartialEq for PowerDelayProfile
impl StructuralPartialEq for PowerDelayProfile
Auto Trait Implementations§
impl Forget for PowerDelayProfile
impl Freeze for PowerDelayProfile
impl RefUnwindSafe for PowerDelayProfile
impl Send for PowerDelayProfile
impl Sync for PowerDelayProfile
impl Unpin for PowerDelayProfile
impl UnsafeUnpin for PowerDelayProfile
impl UnwindSafe for PowerDelayProfile
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