Functions to simulate decoding an LDPC code on a noisy decoder