pub struct MessagePassing {
pub prior: Prior,
pub domain: Domain,
pub iterations: usize,
}Expand description
The configuration shared by lama, oamp and their state evolutions: the prior
of every entry of $x$, the domain of the model and the number of iterations.
§Examples
use comnum_mimo::message_passing::{Domain, MessagePassing, Prior, amp_state_evolution};
use comnum_mapping::constellation::Constellation;
let qpsk = Prior::uniform(&Constellation::qam(4)?.normalized());
let config = MessagePassing { prior: qpsk, iterations: 30, ..MessagePassing::default() };
config.check()?;
let se = amp_state_evolution(&config, 0.5, 0.05);
assert_eq!(se.len(), 30);Fields§
§prior: PriorThe prior of every entry of $x$.
domain: DomainThe domain of the symbols, the channel and the noise.
iterations: usizeIterations (at least 1 for the detectors).
Implementations§
Source§impl MessagePassing
impl MessagePassing
Sourcepub fn check(&self) -> Result<()>
pub fn check(&self) -> Result<()>
Check the configuration.
§Errors
Error::Config for zero iterations or a sparsity outside $(0, 1]$;
Error::Shape for a discrete prior without points or with one probability per
point missing.
Trait Implementations§
Source§impl Clone for MessagePassing
impl Clone for MessagePassing
Source§impl Debug for MessagePassing
impl Debug for MessagePassing
Source§impl Default for MessagePassing
impl Default for MessagePassing
Source§fn default() -> MessagePassing
fn default() -> MessagePassing
A Gaussian prior of unit variance (Prior::BernoulliGaussian with $\rho = 1$),
complex, 10 iterations.
Source§impl PartialEq for MessagePassing
impl PartialEq for MessagePassing
impl StructuralPartialEq for MessagePassing
Auto Trait Implementations§
impl Forget for MessagePassing
impl Freeze for MessagePassing
impl RefUnwindSafe for MessagePassing
impl Send for MessagePassing
impl Sync for MessagePassing
impl Unpin for MessagePassing
impl UnsafeUnpin for MessagePassing
impl UnwindSafe for MessagePassing
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