channel add

This commit is contained in:
2026-02-13 11:21:44 +01:00
parent 33a376967a
commit a6b2690721

14
Code/ldpc/src/channel.rs Normal file
View File

@ -0,0 +1,14 @@
pub rand::Rng;
pub struct Channel {
pub error_prob: f64,
}
impl Channel {
pub fn new(error_prob: f64) -> Self {
assert!(error_prob >= 0.0 && error_prob <= 1.0, "0 <= p <= 1");
Self {error_prob}
}
}