91 LDPC_Parity(
const std::string& filename,
const std::string& format);
116 "LDPC_Parity::get_nvar(): Internal error");
118 "LDPC_Parity::get_nvar(): Internal error");
125 "LDPC_Parity::get_ncheck(): Internal error");
127 "LDPC_Parity::get_ncheck(): Internal error");
132 void set(
int i,
int j,
bin value);
135 bin get(
int i,
int j)
const {
143 "LDPC_Parity::operator(): Internal error");
152 return (1.0 - static_cast<double>(
ncheck) /
nvar);
162 void load_alist(
const std::string& alist_file);
165 void save_alist(
const std::string& alist_file)
const;
317 void compute_CR(
const vec& var_deg,
const vec& chk_deg,
const int Nvar,
338 const std::string& method =
"rand",
339 const ivec& options =
"200 6");
379 void generate(
int Nvar,
const vec& var_deg,
const vec& chk_deg,
380 const std::string& method =
"rand",
381 const ivec& options =
"200 6");
403 const std::string& method =
"rand",
404 const ivec& options =
"200 6");
424 void generate(
int Nvar,
int k,
int l,
425 const std::string& method =
"rand",
426 const ivec& options =
"200 6");
470 BLDPC_Parity(
const std::string &filename,
int exp_factor);
473 void expand_base(
const imat &base_matrix,
int exp_factor);
499 void calculate_base_matrix();
533 virtual void encode(
const bvec &input, bvec &output) = 0;
543 virtual void save(
const std::string& filename)
const = 0;
545 virtual void load(
const std::string& filename) = 0;
571 bool natural_ordering =
false,
572 const ivec& ind =
"");
578 virtual void encode(
const bvec &input, bvec &output);
614 const ivec& ind =
"");
618 virtual void save(
const std::string& filename)
const;
620 virtual void load(
const std::string& filename);
646 const std::string
type =
"BLDPC");
652 void encode(
const bvec &input, bvec &output);
659 void save(
const std::string &filename)
const;
661 void load(
const std::string &filename);
782 void save_code(
const std::string& filename)
const;
809 bool syndr_check_each_iter =
true,
810 bool syndr_check_at_start =
false);
827 virtual void encode(
const bvec &input, bvec &output);
829 virtual bvec
encode(
const bvec &input);
835 virtual void decode(
const bvec &, bvec &) {
836 it_error(
"LDPC_Code::decode(): Hard input decoding not implemented");
840 it_error(
"LDPC_Code::decode(): Hard input decoding not implemented");
845 virtual void decode(
const vec &llr_in, bvec &syst_bits);
847 virtual bvec
decode(
const vec &llr_in);
876 int bp_decode(
const QLLRvec &LLRin, QLLRvec &LLRout);
895 return (1.0 - static_cast<double>(
ncheck) /
nvar);
944 ivec C, V, sumX1, sumX2, iind, jind;
950 static const int max_cnd = 200;