IT++ Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exit.h
Go to the documentation of this file.
1 
29 #ifndef EXIT_H
30 #define EXIT_H
31 
32 #include <itpp/itbase.h>
33 #include <itpp/comm/modulator.h> //BPSK class for a priori information generation
34 
35 namespace itpp
36 {
37 
54 class EXIT
55 {
56 public:
58 
60  double apriori_mutual_info(const double &in_sigma2A,
61  const double &lim=100
62  )
63  {
64  sigma2A = in_sigma2A;
65  return 1.0-itpp::quad(&gaussian_fct, -lim, lim);
66  };
68 
71  itpp::vec generate_apriori_info(const itpp::bvec &bits)
72  {
73  itpp::BPSK bpsk;
74  return (-sigma2A/2)*bpsk.modulate_bits(bits)+std::sqrt(sigma2A)*itpp::randn(bits.length());
75  };
77 
80  double extrinsic_mutual_info(const itpp::vec &obs,
81  const itpp::bvec &cond,
82  const int &N=100
83  );
84 private:
85  static double sigma2A;
86  friend double itpp::quad(double (*f)(double), double a, double b, double tol);
87  static double gaussian_fct(const double x);
88 };
89 
90 }
91 #endif /* EXIT_H_ */
SourceForge Logo

Generated on Fri Mar 21 2014 17:14:13 for IT++ by Doxygen 1.8.1.2