exit.h
Go to the documentation of this file.
#ifndef EXIT_H
#define EXIT_H
#include <itpp/itbase.h>
#include <itpp/comm/modulator.h> //BPSK class for a priori information generation
#include <itpp/itexports.h>
namespace itpp
{
class ITPP_EXPORT EXIT
{
public:
double apriori_mutual_info(const double &in_sigma2A,
const double &lim=100
)
{
_gaussian_fct = Gaussian_Fct(in_sigma2A);
return 1.0-itpp::quad(_gaussian_fct, -lim, lim);
};
itpp::vec generate_apriori_info(const itpp::bvec &bits)
{
itpp::BPSK bpsk;
double sigma2A = _gaussian_fct.sigma();
return (-sigma2A/2)*bpsk.modulate_bits(bits)+std::sqrt(sigma2A)*itpp::randn(bits.length());
};
double extrinsic_mutual_info(const itpp::vec &obs,
const itpp::bvec &cond,
const int &N=100
);
private:
class ITPP_EXPORT Gaussian_Fct
{
double _sigma;
public:
Gaussian_Fct(): _sigma(0.0){}
Gaussian_Fct(double sigma): _sigma(sigma){}
double sigma() const {return _sigma;}
double operator()(double x) const;
};
Gaussian_Fct _gaussian_fct;
};
}
#endif /* EXIT_H_ */
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
itpp::EXIT
EXtrinsic Information Transfer (EXIT) chart.
Definition: exit.h:56
itpp::EXIT::generate_apriori_info
itpp::vec generate_apriori_info(const itpp::bvec &bits)
Generates a priori information assuming a Gaussian distribution of the a priori information.
Definition: exit.h:72
itpp::EXIT::apriori_mutual_info
double apriori_mutual_info(const double &in_sigma2A, const double &lim=100)
Computes the a priori mutual information.
Definition: exit.h:61
itpp::sqrt
vec sqrt(const vec &x)
Square root of the elements.
Definition: elem_math.h:123
itpp::randn
double randn(void)
Generates a random Gaussian (0,1) variable.
Definition: random.h:831
itbase.h
Include file for the IT++ base module.
modulator.h
One- and two-dimensional modulators - header file.
itpp
itpp namespace
Definition: itmex.h:37
itpp::quad
double quad(Ftn f, double a, double b, double tol=std::numeric_limits< double >::epsilon())
Definition: integration.h:162

Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.1