Skip to main content

PowerDelayProfile

Struct PowerDelayProfile 

Source
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

Source

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());
Source

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.

Source

pub fn delays(&self) -> &[f64]

The delays (samples of the IFFT of size PowerDelayProfile::n_fft).

Source

pub fn powers(&self) -> &[f64]

The powers (linear, of unit sum).

Source

pub fn n_fft(&self) -> usize

The IFFT size $N$ the delays refer to.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PowerDelayProfile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PowerDelayProfile

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PowerDelayProfile

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.