use super::{HDPC, LDPC};
use crate::types::{CodeParams, CodeType, DecodingConfig, DegreeSetFn};
pub type PrecodePair = (Option<Box<dyn HDPC>>, Option<Box<dyn LDPC>>);
pub trait CodeScheme {
fn get_params(&self) -> CodeParams;
fn code_type(&self) -> CodeType;
fn create_degree_set_fn(&self) -> DegreeSetFn;
fn create_precode(&self) -> PrecodePair;
#[deprecated(since = "1.1.0", note = "use decoding_config instead")]
fn max_inactive_num(&self) -> usize {
self.get_params().h + self.get_params().b
}
fn decoding_config(&self) -> DecodingConfig {
DecodingConfig::default().with_max_inact_num(self.get_params().num_inactive())
}
}