35#include <itpp/itexports.h>
154 QLLRvec probabilities(QLLR l);
160 void demodllrbit0(itpp::QLLR&
llr)
const;
162 void demodllrbit1(itpp::QLLR&
llr)
const;
164 void demodllrbit2(itpp::QLLR&
llr)
const;
166 void demodmaxbit0(itpp::QLLR&
maxllr)
const;
168 void demodmaxbit1(itpp::QLLR&
maxllr)
const;
170 void demodmaxbit2(itpp::QLLR&
maxllr)
const;
260 void modulate_bits(
const bvec &
bits, vec &symbols)
const;
263 vec modulate_bits(
const bvec &
bits)
const;
283 void init_soft_demodulator(
const itpp::mat& H,
const double& sigma2);
345 void demodulate_soft_bits(
const vec &y,
const mat &H,
double sigma2,
369 QLLRvec demodulate_soft_bits(
const vec &y,
const mat &H,
double sigma2,
381 void demodulate_soft_bits(
const vec &y,
const vec &
h,
double sigma2,
407 const mat &
HtH,
const ivec &s);
410 void hxnormupdate(itpp::vec&
Hx,
unsigned&
bitstring,
unsigned&
ind,
unsigned bit);
459 void modulate_bits(
const bvec &
bits, cvec &symbols)
const;
462 cvec modulate_bits(
const bvec &
bits)
const;
482 void init_soft_demodulator(
const itpp::cmat& H,
const double& sigma2);
543 void demodulate_soft_bits(
const cvec &y,
const cmat &H,
double sigma2,
570 QLLRvec demodulate_soft_bits(
const cvec &y,
const cmat &H,
double sigma2,
582 void demodulate_soft_bits(
const cvec &y,
const cvec &
h,
double sigma2,
598 void hxnormupdate(itpp::cvec&
Hx,
unsigned&
bitstring,
unsigned&
ind,
unsigned bit);
663 void set_M(
int nt = 1,
int Mary = 2);
666 void set_M(
int nt = 1, ivec
Mary =
"2");
691 int sphere_decoding(
const vec &y,
const mat &H,
double rmin,
double rmax,
696 int sphere_search_SE(
const vec &y,
const mat &H,
const imat &
zrange,
697 double r, ivec &
zhat);
701 inline int sign_nozero_i(
int a) {
702 return (
a > 0 ? 1 : -1);
704 inline int sign_nozero_i(
double a) {
705 return (a > 0.0 ? 1 : -1);
729 void set_M(
int nt = 1,
int Mary = 4);
732 void set_M(
int nt = 1, ivec
Mary =
"4");
777 void set_M(
int nt = 1,
int Mary = 4);
780 void set_M(
int nt = 1, ivec
Mary =
"4");
Definition of Array class (container)
Import/Export definitions for some templates defined in base folder.
std::ostream & operator<<(std::ostream &os, const Array< T > &a)
Output stream for Array<T>. T must have ostream operator<< defined.
Log-likelihood algebra calculation unit.
Base class for vector (MIMO) channel modulator/demodulators with complex valued components.
Modulator_NCD()
Constructor.
void demodulate_soft_bits(const cvec &y, const QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori, Soft_Demod_Method method=FULL_ENUM_LOGMAP)
Soft MAP demodulation for multidimensional channel, by "brute-force" enumeration of all constellation...
itpp::Array< itpp::Array< itpp::cvec > > hspacings
The spacing between different constellation points multiplied by the different H columns.
itpp::Array< itpp::vec > yspacings
The spacing between different constellation points scaled by different y elements.
itpp::cmat H
Complex-valued channel matrix.
Array< cvec > symbols
Vectors of modulation symbols (along each dimension)
virtual ~Modulator_NCD()
Destructor.
Base class for an N-dimensional (ND) vector (MIMO) modulator.
itpp::QLLRvec Qnorms
Norms part depending on both H and y.
double gaussnorm
The normalization factor in the exponent (in front of the square norm) in the Gaussian distribution.
Array< ivec > bits2symbols
Bit pattern in decimal form ordered and the corresponding symbols (one pattern per dimension)
ivec get_k() const
Get number of bits per modulation symbol per dimension.
int nt
Number of dimensions.
ivec bits_per_symbol() const
Get number of bits per modulation symbol per dimension.
int get_dim() const
Get number of dimensions.
itpp::vec hnorms
Norms part dependent on H.
ivec M
Number of modulation symbols along each dimension.
itpp::ivec bitcumsum
The cumulative sum of bits in the symbol vector.
ivec k
Number of bits per modulation symbol.
itpp::QLLRvec llrapr
A prioi information.
LLR_calc_unit get_llrcalc() const
Get LLR calculation unit.
Array< ivec > get_bits2symbols() const
Get bit pattern in decimal.
Soft_Demod_Method
Soft demodulation method.
@ FULL_ENUM_MAXLOG
Max-Log demodulation by "brute-force" enumeration of all points.
@ FULL_ENUM_LOGMAP
Log-MAP demodulation by "brute-force" enumeration of all points.
LLR_calc_unit llrcalc
LLR calculation unit.
itpp::Array< itpp::Vec< unsigned > > gray2dec
The Gray to decimal mapping.
int nb
Number of bits in the symbol vector.
ivec get_M() const
Get number of modulation symbols per dimension.
virtual ~Modulator_ND()
Destructor.
Modulator_ND(LLR_calc_unit llrcalc_in=LLR_calc_unit())
Default constructor.
Array< bmat > get_bitmap() const
Get Bit mapping table.
Array< bmat > bitmap
Bit mapping table (one table per dimension)
void set_llrcalc(LLR_calc_unit llrcalc_in)
Set LLR calculation unit.
bool demod_initialized
Flag indicating whether the demodulator has been initialized.
itpp::ivec bpos2cpos
The bit to column mapping.
Base class for N-dimensional vector (MIMO) channel modulators/demodulators with real-valued component...
virtual ~Modulator_NRD()
Destructor.
void update_norm(double &norm, int k, int sold, int snew, const vec &ytH, const mat &HtH, const ivec &s)
Update residual norm (for internal use).
void demodulate_soft_bits(const vec &y, const QLLRvec &LLR_apriori, QLLRvec &LLR_aposteriori, Soft_Demod_Method method=FULL_ENUM_LOGMAP)
Soft MAP demodulation for multidimensional channel, by "brute-force" enumeration of all constellation...
itpp::Array< itpp::vec > yspacings
The spacing between different constellation points scaled by different y elements.
itpp::mat H
Real channel matrix.
Array< vec > symbols
Vectors of modulation symbols (along each dimension)
Modulator_NRD()
Constructor.
itpp::Array< itpp::Array< itpp::vec > > hspacings
The spacing between different constellation points multiplied by the different H columns.
Real-valued MIMO channel with uniform PAM along each dimension.
virtual ~ND_UPAM()
Destructor.
virtual ~ND_UPSK()
Destructor.
Complex MIMO channel with uniform QAM per dimension.
ivec L
the square root of M
virtual ~ND_UQAM()
Destructor.
double norm(const cvec &v)
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2))
Class for numerically efficient log-likelihood algebra.
std::ostream & operator<<(std::ostream &output, const bin &inbin)
Output stream of bin.
Templated Vector Class Definitions.