AFF3CT
A Fast Forward Error Correction Tool!
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
Encoder_i< B > Class Template Referenceabstract

Encodes a vector of information bits (a message) and adds some redundancy (parity bits). More...

#include <Encoder.hpp>

Inheritance diagram for Encoder_i< B >:
Module SC_Encoder< B > Encoder_NO< B > Encoder_polar< B > Encoder_RA< B > Encoder_sys< B > Encoder_turbo< B > Encoder_turbo_legacy< B > Encoder_user< B > Encoder_polar_sys< B > Encoder_AZCW< B > Encoder_coset< B > Encoder_repetition_sys< B > Encoder_RSC_sys< B > Encoder_RSC3_CPE_sys< B > Encoder_RSC_generic_sys< B > Encoder_RSC_generic_json_sys< B >

Public Member Functions

 Encoder_i (const int K, const int N, const int n_frames=1, const std::string name="Encoder_i")
 Constructor. More...
 
virtual ~Encoder_i ()
 Destructor.
 
virtual void encode (const mipp::vector< B > &U_K, mipp::vector< B > &X_N)=0
 Encodes a vector of information bits (a message). More...
 
virtual int tail_length () const
 Gets the number of tail bits. More...
 
- Public Member Functions inherited from Module
 Module (const int n_frames=1, const std::string name="Module")
 Constructor. More...
 
virtual ~Module ()
 Destructor.
 
virtual void set_n_frames (const int n_frames)
 Set the number of frames. More...
 
virtual int get_n_frames () const
 Get the number of frames. More...
 
void rename (const std::string name)
 Rename the Module. More...
 

Protected Attributes

const int K
 
const int N
 
- Protected Attributes inherited from Module
int n_frames
 
std::string name
 

Detailed Description

template<typename B>
class Encoder_i< B >

Encodes a vector of information bits (a message) and adds some redundancy (parity bits).

Template Parameters
Btype of the bits in the encoder.

Please use Encoder for inheritance (instead of Encoder_i)

Constructor & Destructor Documentation

template<typename B >
Encoder_i< B >::Encoder_i ( const int  K,
const int  N,
const int  n_frames = 1,
const std::string  name = "Encoder_i< B >" 
)
inline

Constructor.

Parameters
Knumber of information bits in the frame.
Nsize of one frame.
n_framesnumber of frames to process in the Encoder.
nameEncoder's name.

Member Function Documentation

template<typename B >
virtual void Encoder_i< B >::encode ( const mipp::vector< B > &  U_K,
mipp::vector< B > &  X_N 
)
pure virtual

Encodes a vector of information bits (a message).

Parameters
U_Ka vector of information bits (a message).
X_Nan encoded frame with redundancy added (parity bits).

Implemented in Encoder_turbo< B >, Encoder_turbo_legacy< B >, Encoder_RSC_sys< B >, Encoder_coset< B >, Encoder_RA< B >, Encoder_repetition_sys< B >, Encoder_polar< B >, Encoder_user< B >, Encoder_polar_sys< B >, Encoder_AZCW< B >, and Encoder_NO< B >.

template<typename B >
virtual int Encoder_i< B >::tail_length ( ) const
inlinevirtual

Gets the number of tail bits.

Some encoders need to add some additional bits in order to work. This is often the case for the cyclic codes. Other codes do not require this feature and so, the tail bits length is 0.

Returns
the number of tail bits.

Reimplemented in Encoder_turbo< B >, and Encoder_RSC_sys< B >.

Member Data Documentation

template<typename B >
const int Encoder_i< B >::K
protected

Number of information bits in one frame

template<typename B >
const int Encoder_i< B >::N
protected

Size of one frame (= number of bits in one frame)


The documentation for this class was generated from the following file: