pub struct RandomDisc {
pub radius: f64,
pub alpha: f64,
}Expand description
Users dropped uniformly in a disc around the base station, path loss $1 + d^{\alpha}$, Rayleigh fading.
Fields§
§radius: f64Radius $\mathcal{R}_{D}$ of the disc (m).
alpha: f64Path-loss exponent $\alpha$.
Implementations§
Source§impl RandomDisc
impl RandomDisc
Sourcepub fn gain_cdf(&self, y: f64) -> Result<f64>
pub fn gain_cdf(&self, y: f64) -> Result<f64>
The CDF of the gain $|h|^{2}$ of a user dropped at random, eq. (3) (Gauss–Legendre, 256 nodes on $[0, \mathcal{R}_{D}]$).
§Errors
Error::Config for a radius or an exponent that is not positive and finite.
Sourcepub fn gain_cdf_chebyshev(&self, y: f64, n: usize) -> Result<f64>
pub fn gain_cdf_chebyshev(&self, y: f64, n: usize) -> Result<f64>
The Gauss–Chebyshev approximation (4) of RandomDisc::gain_cdf with n nodes.
§Errors
As RandomDisc::gain_cdf, and Error::Config for n = 0.
Trait Implementations§
Source§impl Clone for RandomDisc
impl Clone for RandomDisc
impl Copy for RandomDisc
Source§impl Debug for RandomDisc
impl Debug for RandomDisc
Source§impl PartialEq for RandomDisc
impl PartialEq for RandomDisc
impl StructuralPartialEq for RandomDisc
Auto Trait Implementations§
impl Forget for RandomDisc
impl Freeze for RandomDisc
impl RefUnwindSafe for RandomDisc
impl Send for RandomDisc
impl Sync for RandomDisc
impl Unpin for RandomDisc
impl UnsafeUnpin for RandomDisc
impl UnwindSafe for RandomDisc
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