29 #ifndef PUNCT_CONVCODE_H
30 #define PUNCT_CONVCODE_H
36 #include <itpp/itexports.h>
97 void set_generator_polynomials(
const ivec &gen,
int constraint_length)
109 void set_puncture_matrix(
const bmat &pmatrix);
119 void encode(
const bvec &input, bvec &output);
121 bvec
encode(
const bvec &input) { bvec output;
encode(input, output);
return output; }
124 void encode_trunc(
const bvec &input, bvec &output);
135 void encode_tail(
const bvec &input, bvec &output);
146 void encode_tailbite(
const bvec &input, bvec &output);
148 bvec encode_tailbite(
const bvec &input)
153 virtual void decode(
const vec &received_signal, bvec &output);
155 virtual bvec
decode(
const vec &received_signal) { bvec output;
decode(received_signal, output);
return output; }
158 virtual void decode(
const bvec &coded_bits, bvec &decoded_bits);
159 virtual bvec decode(
const bvec &coded_bits);
162 void decode_trunc(
const vec &received_signal, bvec &output);
172 void decode_tail(
const vec &received_signal, bvec &output);
182 void decode_tailbite(
const vec &received_signal, bvec &output);
184 bvec decode_tailbite(
const vec &received_signal)
185 { bvec output;
decode_tailbite(received_signal, output);
return output; }
193 bool inverse_tail(
const bvec coded_sequence, bvec &input);
196 bool catastrophic(
void);
199 void distance_profile(ivec &dist_prof,
int time,
int dmax = 100000,
bool reverse =
false);
229 void calculate_spectrum(
Array<ivec> &
spectrum,
int time,
int dmax,
int no_terms,
int block_length = 0);
247 int fast(
Array<ivec> &
spectrum,
int time,
int dfree,
int no_terms,
int d_best_so_far = 0,
bool test_catastrophic =
false);
251 int weight(
const int state,
const int input,
int time);
253 void weight(
const int state,
int &w0,
int &w1,
int time);
255 int weight_reverse(
const int state,
const int input,
int time);
257 void weight_reverse(
const int state,
int &w0,
int &w1,
int time);
269 #endif // #ifndef PUNCT_CONVCODE_H