itpp::Block_Interleaver< T > Class Template Reference
Communications Module » Interleavers

Block Interleaver Class. More...

`#include <comm/interleave.h>`

## Public Member Functions

| Block_Interleaver (void)
| Block_Interleaver constructor.
| Block_Interleaver (int in_rows, int in_cols)
| Block_Interleaver constructor.
Vec< T > | interleave (const Vec< T > &input)
| Function for block interleaving. May add some zeros.
void | interleave (const Vec< T > &input, Vec< T > &output)
| Function for block interleaving. May add some zeros.
Vec< T > | deinterleave (const Vec< T > &input, short keepzeros=0)
| Function for block deinterleaving. Removes additional zeros if keepzeros = 0.
void | deinterleave (const Vec< T > &input, Vec< T > &output, short keepzeros=0)
| Function for block deinterleaving. Removes additional zeros if keepzeros = 0.
void | set_rows (int in_rows)
| Set the number of rows for block interleaving.
void | set_cols (int in_cols)
| Set the number of columns for block interleaving.
int | get_rows (void)
| Get the number of rows for block interleaving.
int | get_cols (void)
| Get the number of columns for block interleaving.

## Detailed Description

template<class T>
class itpp::Block_Interleaver< T >

Block Interleaver Class.

Data is written row-wise and read column-wise when interleaving.

### 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);
Block_Interleaver<double> block_interleaver(4,4);
vec interleaved_symbols = block_interleaver.interleave(symbols);
itpp::Array
General array class.
Definition array.h:105
itpp::BPSK
BPSK modulator with real symbols.
Definition modulator.h:877
itpp::BPSK::modulate_bits
void modulate_bits(const bvec &bits, vec &output) const
Modulate bits into BPSK symbols in complex domain.
Definition modulator.cpp:310

Definition at line 61 of file interleave.h.

## Constructor & Destructor Documentation

## Block_Interleaver() [1/2]

template<class T >

itpp::Block_Interleaver< T >::Block_Interleaver | ( | void |  | ) |

inline

Block_Interleaver constructor.

Definition at line 65 of file interleave.h.

## Block_Interleaver() [2/2]

template<class T >

itpp::Block_Interleaver< T >::Block_Interleaver | ( | int | in_rows,
|  | int | in_cols
| ) |  |

Block_Interleaver constructor.

Definition at line 198 of file interleave.h.

## Member Function Documentation

## interleave() [1/2]

template<class T >

Vec< T > itpp::Block_Interleaver< T >::interleave | ( | const Vec< T > & | input | ) |

Function for block interleaving. May add some zeros.

Definition at line 246 of file interleave.h.

## interleave() [2/2]

template<class T >

void itpp::Block_Interleaver< T >::interleave | ( | const Vec< T > & | input,
|  | Vec< T > & | output
| ) |  |

Function for block interleaving. May add some zeros.

Definition at line 206 of file interleave.h.

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

## deinterleave() [1/2]

template<class T >

Vec< T > itpp::Block_Interleaver< T >::deinterleave | ( | const Vec< T > & | input,
|  | short | keepzeros = `0`
| ) |  |

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

Definition at line 296 of file interleave.h.

## deinterleave() [2/2]

template<class T >

void itpp::Block_Interleaver< T >::deinterleave | ( | const Vec< T > & | input,
|  | Vec< T > & | output,
|  | short | keepzeros = `0`
| ) |  |

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

Definition at line 254 of file interleave.h.

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

## set_rows()

template<class T >

void itpp::Block_Interleaver< T >::set_rows | ( | int | in_rows | ) |

inline

Set the number of rows for block interleaving.

Definition at line 77 of file interleave.h.

## set_cols()

template<class T >

void itpp::Block_Interleaver< T >::set_cols | ( | int | in_cols | ) |

inline

Set the number of columns for block interleaving.

Definition at line 79 of file interleave.h.

## get_rows()

template<class T >

int itpp::Block_Interleaver< T >::get_rows | ( | void |  | ) |

inline

Get the number of rows for block interleaving.

Definition at line 81 of file interleave.h.

## get_cols()

template<class T >

int itpp::Block_Interleaver< T >::get_cols | ( | void |  | ) |

inline

Get the number of columns for block interleaving.

Definition at line 83 of file interleave.h.

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

- itpp/comm/interleave.h

Generated on Mon Jun 10 2024 11:49:33 for IT++ by Doxygen 1.9.8