00001 00029 #ifndef STC_H 00030 #define STC_H 00031 00032 #include <itpp/itbase.h> //IT++ base module 00033 00034 namespace itpp 00035 { 00036 00046 class STC 00047 { 00048 public: 00050 void setup(const int &in_em_antennas, const int &in_channel_uses, const std::string &in_code_name, const int &in_const_size) 00051 { 00052 em_antennas = in_em_antennas; 00053 channel_uses = in_channel_uses; 00054 code_name = in_code_name; 00055 const_size = in_const_size; 00056 Hassibi_block_code(); 00057 }; 00059 itpp::cmat encode(const itpp::cvec &symb) 00060 { 00061 return Hassibi_encode(symb); 00062 }; 00064 const int get_nb_symbols_per_block(void) const 00065 { 00066 return symb_block; 00067 }; 00069 const itpp::cmat get_1st_gen_matrix(void) const 00070 { 00071 return A; 00072 }; 00074 const itpp::cmat get_2nd_gen_matrix(void) const 00075 { 00076 return B; 00077 }; 00079 const int get_nb_em_antennas(void) const 00080 { 00081 return em_antennas; 00082 }; 00084 const int get_channel_uses(void) const 00085 { 00086 return channel_uses; 00087 }; 00088 private: 00089 void Hassibi_block_code(void); 00090 itpp::cmat Hassibi_encode(const itpp::cvec &symb); 00091 itpp::cmat diag_pow(const itpp::cmat &in_mat, const double &in_exp); 00092 itpp::mat mat_pow(const itpp::mat &in_mat, const int &in_exp); 00093 int symb_block; 00094 int const_size; 00095 itpp::cmat A; 00096 itpp::cmat B; 00097 int em_antennas; 00098 int channel_uses; 00099 std::string code_name; 00100 }; 00101 00102 } 00103 #endif /* STC_H_ */
Generated on Wed Jul 27 2011 16:27:05 for IT++ by Doxygen 1.7.4