29 #ifndef CHANNEL_CODE_H
30 #define CHANNEL_CODE_H
34 #include <itpp/itexports.h>
59 virtual void encode(
const bvec &uncoded_bits, bvec &coded_bits) = 0;
61 virtual bvec encode(
const bvec &uncoded_bits) = 0;
64 virtual void decode(
const bvec &codedbits, bvec &decoded_bits) = 0;
67 virtual bvec decode(
const bvec &coded_bits) = 0;
70 virtual void decode(
const vec &received_signal, bvec &decoded_bits) = 0;
73 virtual bvec decode(
const vec &received_signal) = 0;
76 virtual double get_rate()
const = 0;
95 virtual void encode(
const bvec &uncoded_bits, bvec &coded_bits) { coded_bits = uncoded_bits; }
97 virtual bvec
encode(
const bvec &uncoded_bits) {
return uncoded_bits; }
100 virtual void decode(
const bvec &coded_bits, bvec &decoded_bits) { decoded_bits = coded_bits; }
102 virtual bvec
decode(
const bvec &coded_bits) {
return coded_bits; }
107 virtual bvec
decode(
const vec &received_signal) { bvec out;
decode(received_signal, out);
return out; }
117 #endif // #ifndef CHANNEL_CODE_H