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

Interleaves or deinterleaves a vector. More...

#include <Interleaver.hpp>

Inheritance diagram for Interleaver_i< T >:
Module SC_Interleaver< T > Interleaver_CCSDS< T > Interleaver_columns< T > Interleaver_golden< T > Interleaver_LTE< T > Interleaver_NO< T > Interleaver_random< T > Interleaver_user< T > Interleaver_uniform< T >

Public Member Functions

 Interleaver_i (const int size, const int n_frames=1, const std::string name="Interleaver_i")
 Constructor. More...
 
virtual ~Interleaver_i ()
 Destructor.
 
mipp::vector< T > get_lookup_table () const
 Gets the lookup table required for the interleaving process. More...
 
mipp::vector< T > get_lookup_table_inverse () const
 Gets the lookup table required for the deinterleaving process. More...
 
template<typename D >
void interleave (const mipp::vector< D > &natural_vec, mipp::vector< D > &interleaved_vec, const bool frame_reordering=false, const int n_frames=-1) const
 Interleaves a vector. More...
 
template<typename D >
void deinterleave (const mipp::vector< D > &interleaved_vec, mipp::vector< D > &natural_vec, const bool frame_reordering=false, const int n_frames=-1) const
 Deinterleaves a vector. More...
 
bool operator== (Interleaver_i< T > &interleaver) const
 Compares two interleavers: the comparison only considers the lookup tables. More...
 
virtual void regen_lookup_tables ()
 Regenerates the interleaving and deinterleaving lookup tables. Do nothing by default.
 
- 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 Member Functions

virtual void gen_lookup_tables ()=0
 Generates the interleaving and deinterleaving lookup tables. This method defines the interleaver and have to be called in the constructor.
 

Protected Attributes

mipp::vector< T > pi
 
mipp::vector< T > pi_inv
 
- Protected Attributes inherited from Module
int n_frames
 
std::string name
 

Detailed Description

template<typename T>
class Interleaver_i< T >

Interleaves or deinterleaves a vector.

Template Parameters
Ttype of the integers used in the lookup tables to store indirections.

Please use Interleaver for inheritance (instead of Interleaver_i)

Constructor & Destructor Documentation

template<typename T>
Interleaver_i< T >::Interleaver_i ( const int  size,
const int  n_frames = 1,
const std::string  name = "Interleaver_i< T >" 
)
inline

Constructor.

Parameters
sizenumber of the data to interleave or to deinterleave.
n_framesnumber of frames to process in the Interleaver.
nameInterleaver's name.

Member Function Documentation

template<typename T>
template<typename D >
void Interleaver_i< T >::deinterleave ( const mipp::vector< D > &  interleaved_vec,
mipp::vector< D > &  natural_vec,
const bool  frame_reordering = false,
const int  n_frames = -1 
) const
inline

Deinterleaves a vector.

Template Parameters
Dtype of data in the input and the output vectors.
Parameters
interleaved_vecan input vector in the interleaved domain.
natural_vecan output vector in the natural domain.
frame_reorderingtrue means that the frames have been reordered for efficient SIMD computations. In this case the deinterleaving process is different (true supposes that there is more than one frame to deinterleave).
n_framesyou should not use this parameter unless you know what you are doing, this parameter redefine the number of frames to deinterleave specifically in this method.
template<typename T>
mipp::vector<T> Interleaver_i< T >::get_lookup_table ( ) const
inline

Gets the lookup table required for the interleaving process.

Returns
a vector of indirections.
template<typename T>
mipp::vector<T> Interleaver_i< T >::get_lookup_table_inverse ( ) const
inline

Gets the lookup table required for the deinterleaving process.

Returns
a vector of indirections.
template<typename T>
template<typename D >
void Interleaver_i< T >::interleave ( const mipp::vector< D > &  natural_vec,
mipp::vector< D > &  interleaved_vec,
const bool  frame_reordering = false,
const int  n_frames = -1 
) const
inline

Interleaves a vector.

Template Parameters
Dtype of data in the input and the output vectors.
Parameters
natural_vecan input vector in the natural domain.
interleaved_vecan output vector in the interleaved domain.
frame_reorderingtrue means that the frames have been reordered for efficient SIMD computations. In this case the interleaving process is different (true supposes that there is more than one frame to interleave).
n_framesyou should not use this parameter unless you know what you are doing, this parameter redefine the number of frames to interleave specifically in this method.
template<typename T>
bool Interleaver_i< T >::operator== ( Interleaver_i< T > &  interleaver) const
inline

Compares two interleavers: the comparison only considers the lookup tables.

Parameters
interleaveran other interleaver.
Returns
true if the two interleavers are the same (if they have the same lookup tables), false otherwise.

Member Data Documentation

template<typename T>
mipp::vector<T> Interleaver_i< T >::pi
protected

Lookup table for the interleaving process

template<typename T>
mipp::vector<T> Interleaver_i< T >::pi_inv
protected

Lookup table for the deinterleaving process


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