bch.h
Go to the documentation of this file.
#ifndef BCH_H
#define BCH_H
#include <itpp/comm/galois.h>
#include <itpp/comm/channel_code.h>
#include <itpp/itexports.h>
namespace itpp
{
//---------------------- BCH --------------------------------------
class ITPP_EXPORT BCH : public Channel_Code
{
public:
BCH(int in_n, int in_k, int in_t, const ivec &genpolynom, bool sys = false);
BCH(int in_n, int in_t, bool sys = false);
virtual ~BCH() { }
virtual void encode(const bvec &uncoded_bits, bvec &coded_bits);
virtual bvec encode(const bvec &uncoded_bits);
virtual bool decode(const bvec &coded_bits, bvec &decoded_message, bvec &cw_isvalid);
virtual void decode(const bvec &coded_bits, bvec &decoded_bits);
virtual bvec decode(const bvec &coded_bits);
// Soft-decision decoding is not implemented
virtual void decode(const vec &received_signal, bvec &output);
virtual bvec decode(const vec &received_signal);
virtual double get_rate() const {
return static_cast<double>(k) / n;
}
virtual int get_k() const {
return k;
}
BCH & operator= (const BCH &) {
return *this;
}
private:
int n, k, t;
GFX g;
const bool systematic;
};
} // namespace itpp
#endif // #ifndef BCH_H
channel_code.h
Channel Code class virtual interface.
itpp::Array
General array class.
Definition array.h:105
itpp::Array::operator=
Array< T > & operator=(const T &e)
Assignment operator.
Definition array.h:338
itpp::BCH
Class for binary, narrow-sense BCH codes.
Definition bch.h:60
itpp::BCH::get_k
virtual int get_k() const
Get cardinality of code k.
Definition bch.h:121
itpp::BCH::get_rate
virtual double get_rate() const
Get the code rate.
Definition bch.h:116
itpp::BCH::~BCH
virtual ~BCH()
Destructor.
Definition bch.h:85
itpp::Channel_Code
Generic Channel Code class.
Definition channel_code.h:51
itpp::GFX
Polynomials over GF(q)[x], where q=2^m, m=1,...,16.
Definition galois.h:176
galois.h
Definitions of Galois Field algebra classes and functions.
itpp
itpp namespace
Definition itmex.h:37

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8