IT++ Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stc.h
Go to the documentation of this file.
1 
29 #ifndef STC_H
30 #define STC_H
31 
32 #include <itpp/itbase.h> //IT++ base module
33 
34 namespace itpp
35 {
36 
46 class STC
47 {
48 public:
50  void setup(const int &in_em_antennas, const int &in_channel_uses, const std::string &in_code_name, const int &in_const_size)
51  {
52  em_antennas = in_em_antennas;
53  channel_uses = in_channel_uses;
54  code_name = in_code_name;
55  const_size = in_const_size;
56  Hassibi_block_code();
57  };
59  itpp::cmat encode(const itpp::cvec &symb)
60  {
61  return Hassibi_encode(symb);
62  };
64  const int get_nb_symbols_per_block(void) const
65  {
66  return symb_block;
67  };
69  const itpp::cmat get_1st_gen_matrix(void) const
70  {
71  return A;
72  };
74  const itpp::cmat get_2nd_gen_matrix(void) const
75  {
76  return B;
77  };
79  const int get_nb_em_antennas(void) const
80  {
81  return em_antennas;
82  };
84  const int get_channel_uses(void) const
85  {
86  return channel_uses;
87  };
88 private:
89  void Hassibi_block_code(void);
90  itpp::cmat Hassibi_encode(const itpp::cvec &symb);
91  itpp::cmat diag_pow(const itpp::cmat &in_mat, const double &in_exp);
92  itpp::mat mat_pow(const itpp::mat &in_mat, const int &in_exp);
93  int symb_block;
94  int const_size;
95  itpp::cmat A;
96  itpp::cmat B;
97  int em_antennas;
98  int channel_uses;
99  std::string code_name;
100 };
101 
102 }
103 #endif /* STC_H_ */
SourceForge Logo

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