IT++ Logo
Public Member Functions | List of all members
itpp::Sequence_Interleaver< T > Class Template Reference

Sequence Interleaver Class. More...

#include <comm/interleave.h>

Public Member Functions

 Sequence_Interleaver (void)
 Sequence_Interleaver constructor.
 
 Sequence_Interleaver (int in_interleaver_depth)
 Sequence_Interleaver constructor.
 
 Sequence_Interleaver (ivec in_interleaver_sequence)
 Sequence_Interleaver constructor.
 
Vec< T > interleave (const Vec< T > &input)
 Function for sequence interleaving. May add some zeros.
 
void interleave (const Vec< T > &input, Vec< T > &output)
 Function for sequence interleaving. May add some zeros.
 
Vec< T > deinterleave (const Vec< T > &input, short keepzeros=0)
 Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.
 
void deinterleave (const Vec< T > &input, Vec< T > &output, short keepzeros=0)
 Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.
 
void randomize_interleaver_sequence ()
 Generate a new random sequence for interleaving.
 
ivec get_interleaver_sequence ()
 Returns the interleaver sequence presently used.
 
void set_interleaver_sequence (ivec in_interleaver_sequence)
 Set the interleaver sequence to be used.
 
void set_interleaver_depth (int in_interleaver_depth)
 Set the length of the interleaver sequence to be used.
 
int get_interleaver_depth (void)
 Get the length of the interleaver sequence presently used.
 

Detailed Description

template<class T>
class itpp::Sequence_Interleaver< T >

Sequence Interleaver Class.

Example of use:

BPSK bpsk;
bvec bits = "0 1 1 0 0 0 1 1 1 1 0 0 1 0 0 1";
vec symbols = bpsk.modulate_bits(bits);
sequence_interleaver.randomize_interleaver_sequence();
vec interleaved_symbols = sequence_snterleaver.interleave(symbols);
General array class.
Definition array.h:105
BPSK modulator with real symbols.
Definition modulator.h:877
void modulate_bits(const bvec &bits, vec &output) const
Modulate bits into BPSK symbols in complex domain.

Definition at line 151 of file interleave.h.

Constructor & Destructor Documentation

◆ Sequence_Interleaver() [1/3]

template<class T >
itpp::Sequence_Interleaver< T >::Sequence_Interleaver ( void  )
inline

Sequence_Interleaver constructor.

Definition at line 155 of file interleave.h.

◆ Sequence_Interleaver() [2/3]

template<class T >
itpp::Sequence_Interleaver< T >::Sequence_Interleaver ( int  in_interleaver_depth)

Sequence_Interleaver constructor.

Chooses a random sequence of length in_interleaver_depth for interleaving.

Definition at line 414 of file interleave.h.

References itpp::randu().

◆ Sequence_Interleaver() [3/3]

template<class T >
itpp::Sequence_Interleaver< T >::Sequence_Interleaver ( ivec  in_interleaver_sequence)

Sequence_Interleaver constructor.

Uses the in_interleaver_sequence for interleaving.

Definition at line 422 of file interleave.h.

References itpp::Array< T >::length().

Member Function Documentation

◆ interleave() [1/2]

template<class T >
Vec< T > itpp::Sequence_Interleaver< T >::interleave ( const Vec< T > &  input)

Function for sequence interleaving. May add some zeros.

Definition at line 468 of file interleave.h.

Referenced by itpp::Turbo_Codec::decode_block(), and itpp::Turbo_Codec::decode_n3().

◆ interleave() [2/2]

template<class T >
void itpp::Sequence_Interleaver< T >::interleave ( const Vec< T > &  input,
Vec< T > &  output 
)

Function for sequence interleaving. May add some zeros.

Definition at line 430 of file interleave.h.

References itpp::Array< T >::concat, itpp::Array< T >::length(), itpp::Array< T >::right(), and itpp::Array< T >::set_size().

◆ deinterleave() [1/2]

template<class T >
Vec< T > itpp::Sequence_Interleaver< T >::deinterleave ( const Vec< T > &  input,
short  keepzeros = 0 
)

Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.

Definition at line 515 of file interleave.h.

Referenced by itpp::Turbo_Codec::decode_block(), and itpp::Turbo_Codec::decode_n3().

◆ deinterleave() [2/2]

template<class T >
void itpp::Sequence_Interleaver< T >::deinterleave ( const Vec< T > &  input,
Vec< T > &  output,
short  keepzeros = 0 
)

Function for sequence deinterleaving. Removes additional zeros if keepzeros = 0.

Definition at line 476 of file interleave.h.

References itpp::Array< T >::concat, itpp::Array< T >::length(), itpp::Array< T >::right(), itpp::Array< T >::set_length(), and itpp::Array< T >::set_size().

◆ randomize_interleaver_sequence()

template<class T >
void itpp::Sequence_Interleaver< T >::randomize_interleaver_sequence ( )

Generate a new random sequence for interleaving.

Definition at line 523 of file interleave.h.

References itpp::randu().

◆ get_interleaver_sequence()

template<class T >
ivec itpp::Sequence_Interleaver< T >::get_interleaver_sequence ( )

Returns the interleaver sequence presently used.

Definition at line 529 of file interleave.h.

◆ set_interleaver_sequence()

template<class T >
void itpp::Sequence_Interleaver< T >::set_interleaver_sequence ( ivec  in_interleaver_sequence)

Set the interleaver sequence to be used.

Definition at line 535 of file interleave.h.

References itpp::Array< T >::size().

Referenced by itpp::Turbo_Codec::set_interleaver(), and itpp::Turbo_Codec::set_parameters().

◆ set_interleaver_depth()

template<class T >
void itpp::Sequence_Interleaver< T >::set_interleaver_depth ( int  in_interleaver_depth)
inline

Set the length of the interleaver sequence to be used.

Definition at line 183 of file interleave.h.

Referenced by itpp::Turbo_Codec::set_interleaver(), and itpp::Turbo_Codec::set_parameters().

◆ get_interleaver_depth()

template<class T >
int itpp::Sequence_Interleaver< T >::get_interleaver_depth ( void  )
inline

Get the length of the interleaver sequence presently used.

Definition at line 185 of file interleave.h.


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

Generated on Tue Mar 26 2024 19:08:31 for IT++ by Doxygen 1.9.8