38 #include <itpp/itexports.h> 135 LLR_calc_unit(
short int Dint1,
short int Dint2,
short int Dint3);
165 void init_llr_tables(
short int Dint1 = 12,
short int Dint2 = 300,
166 short int Dint3 = 7);
169 QLLR to_qllr(
double l)
const;
172 QLLRvec to_qllr(
const vec &l)
const;
175 QLLRmat to_qllr(
const mat &l)
const;
178 double to_double(QLLR l)
const;
181 vec to_double(
const QLLRvec &l)
const;
184 mat to_double(
const QLLRmat &l)
const;
191 inline QLLR jaclog(QLLR a, QLLR b)
const;
203 QLLR Boxplus(QLLR a, QLLR b)
const;
210 inline QLLR logexp(QLLR x)
const;
220 ivec construct_logexp_table();
226 short int Dint1, Dint2, Dint3;
242 return static_cast<double>(l) / (1 << Dint1);
247 double QLLR_MAX_double = to_double(QLLR_MAX);
249 if (l > QLLR_MAX_double) {
253 if (l < -QLLR_MAX_double) {
257 return static_cast<QLLR
>(
std::floor(0.5 + (1 << Dint1) * l));
264 int ind = x >> Dint3;
269 it_assert_debug(ind < Dint2,
"LLR_calc_unit::logexp(): internal error");
276 return logexp_table(ind);
293 if (maxab >= QLLR_MAX)
296 return (maxab + logexp(x));
Various functions on vectors and matrices - header file.
vec floor(const vec &x)
Round to nearest lower integer.
std::ostream & operator<<(std::ostream &output, const bin &inbin)
Output stream of bin.
QLLR to_qllr(double l) const
Convert a "real" LLR value to an LLR type.
#define it_assert_debug(t, s)
Abort if t is not true and NDEBUG is not defined.
double to_double(QLLR l) const
Convert an LLR type to a "real" LLR.
#define it_info_debug(s)
Print information message if NDEBUG is not defined.
Matrix Class Definitions.
T max(const Vec< T > &v)
Maximum value of vector.
Definitions of special vectors and matrices.
Log-likelihood algebra calculation unit.
QLLR jaclog(QLLR a, QLLR b) const
Jacobian logarithm.
Templated Vector Class Definitions.
QLLR logexp(QLLR x) const
Logexp operator.