29 #ifndef REC_SYST_CONV_CODE_H
30 #define REC_SYST_CONV_CODE_H
36 #include <itpp/itexports.h>
69 void set_generator_polynomials(
const ivec &gen,
int constraint_length);
77 void set_awgn_channel_parameters(
double Ec,
double N0);
84 void set_scaling_factor(
double in_Lc);
98 void encode_tail(
const bvec &input, bvec &tail,
bmat &parity_bits);
103 void encode(
const bvec &input,
bmat &parity_bits);
120 virtual void map_decode(
const vec &rec_systematic,
const mat &rec_parity,
const vec &extrinsic_input, vec &extrinsic_output,
121 bool set_terminated =
false);
141 virtual void log_decode(
const vec &rec_systematic,
const mat &rec_parity,
const vec &extrinsic_input,
142 vec &extrinsic_output,
bool set_terminated =
false, std::string metric =
"LOGMAX");
158 virtual void log_decode_n2(
const vec &rec_systematic,
159 const vec &rec_parity,
160 const vec &extrinsic_input,
161 vec &extrinsic_output,
162 bool set_terminated =
false,
163 std::string metric =
"LOGMAX");
179 virtual void log_decode(
const QLLRvec &rec_systematic,
180 const QLLRmat &rec_parity,
181 const QLLRvec &extrinsic_input,
182 QLLRvec &extrinsic_output,
183 bool set_terminated =
false);
197 virtual void log_decode_n2(
const QLLRvec &rec_systematic,
198 const QLLRvec &rec_parity,
199 const QLLRvec &extrinsic_input,
200 QLLRvec &extrinsic_output,
201 bool set_terminated =
false);
210 int calc_state_transition(
const int instate,
const int input, ivec &parity);
213 ivec gen_pol, gen_pol_rev;
214 int encoder_state, Nstates;
216 imat state_trans, output_parity, rev_state_trans, rev_output_parity;
227 const double infinity;
232 #endif // #ifndef REC_SYST_CONV_CODE_H