#include <gnuradio/fec/awgn_bp.h>
Public Member Functions | |
awgn_bp () | |
Default constructor. More... | |
awgn_bp (const GF2Mat X) | |
A constructor for given GF2Mat. More... | |
awgn_bp (alist _list) | |
A constructor for given alist. More... | |
void | set_alist (alist _list) |
Initializes the class using given alist. More... | |
std::vector< std::vector< double > > | get_Q () |
Returns the variable Q. More... | |
std::vector< std::vector< double > > | get_R () |
Returns the variable R. More... | |
GF2Mat | get_H () |
Returns the variable H. More... | |
void | rx_lr_calc (std::vector< float > codeword) |
Calculates the likelihood ratios given an input vector. More... | |
std::vector< double > | get_rx_lr () |
Returns the variable rx_lr. More... | |
std::vector< double > | get_lr () |
Returns the variable lr. More... | |
void | spa_initialize () |
Initializes the sum product algorithm set-up. More... | |
void | update_chks () |
Updates the check-nodes based on messages from variable nodes. More... | |
void | update_vars () |
Updates the variable-nodes based on messages from check nodes. More... | |
std::vector< uint8_t > | get_estimate () |
Returns the current estimate. More... | |
void | compute_init_estimate (std::vector< float > rx_word) |
Computes initial estimate based on the vector rx_word. More... | |
void | decision () |
Computes the estimate based on current likelihood-ratios lr. More... | |
std::vector< uint8_t > | get_syndrome () |
Returns the syndrome for the current estimate. More... | |
std::vector< uint8_t > | get_syndrome (const std::vector< uint8_t > codeword) |
Returns the syndrome for the input codeword. More... | |
bool | is_codeword () |
Checks if the current estimate is a codeword. More... | |
bool | is_codeword (const std::vector< uint8_t > codeword) |
Checks if the input is a codeword. More... | |
void | set_K (int k) |
Sets the variable K. More... | |
int | get_K () |
Returns the variable K. More... | |
void | set_max_iterations (int k) |
Sets the variable max_iterations. More... | |
int | get_max_iterations () |
Returns the variable max_iterations. More... | |
std::vector< uint8_t > | decode (std::vector< float > rx_word, int *niterations) |
Decodes the given vector rx_word by message passing. More... | |
|
inline |
Default constructor.
awgn_bp::awgn_bp | ( | alist | _list | ) |
A constructor for given alist.
void awgn_bp::compute_init_estimate | ( | std::vector< float > | rx_word | ) |
Computes initial estimate based on the vector rx_word.
void awgn_bp::decision | ( | ) |
Computes the estimate based on current likelihood-ratios lr.
std::vector<uint8_t> awgn_bp::decode | ( | std::vector< float > | rx_word, |
int * | niterations | ||
) |
Decodes the given vector rx_word by message passing.
rx_word | The received samples for decoding. |
niterations | The number of message passing iterations done to decode this codeword. |
std::vector<uint8_t> awgn_bp::get_estimate | ( | ) |
Returns the current estimate.
GF2Mat awgn_bp::get_H | ( | ) |
Returns the variable H.
int awgn_bp::get_K | ( | ) |
Returns the variable K.
std::vector<double> awgn_bp::get_lr | ( | ) |
Returns the variable lr.
int awgn_bp::get_max_iterations | ( | ) |
Returns the variable max_iterations.
std::vector<std::vector<double> > awgn_bp::get_Q | ( | ) |
Returns the variable Q.
std::vector<std::vector<double> > awgn_bp::get_R | ( | ) |
Returns the variable R.
std::vector<double> awgn_bp::get_rx_lr | ( | ) |
Returns the variable rx_lr.
std::vector<uint8_t> awgn_bp::get_syndrome | ( | ) |
Returns the syndrome for the current estimate.
std::vector<uint8_t> awgn_bp::get_syndrome | ( | const std::vector< uint8_t > | codeword | ) |
Returns the syndrome for the input codeword.
bool awgn_bp::is_codeword | ( | ) |
Checks if the current estimate is a codeword.
bool awgn_bp::is_codeword | ( | const std::vector< uint8_t > | codeword | ) |
Checks if the input is a codeword.
void awgn_bp::rx_lr_calc | ( | std::vector< float > | codeword | ) |
Calculates the likelihood ratios given an input vector.
void awgn_bp::set_alist | ( | alist | _list | ) |
Initializes the class using given alist.
void awgn_bp::set_K | ( | int | k | ) |
Sets the variable K.
void awgn_bp::set_max_iterations | ( | int | k | ) |
Sets the variable max_iterations.
void awgn_bp::spa_initialize | ( | ) |
Initializes the sum product algorithm set-up.
void awgn_bp::update_chks | ( | ) |
Updates the check-nodes based on messages from variable nodes.
void awgn_bp::update_vars | ( | ) |
Updates the variable-nodes based on messages from check nodes.