39 B =
"0 1 1 1 1 1 1 1 1 1 1 1;1 1 1 0 1 1 1 0 0 0 1 0;1 1 0 1 1 1 0 0 0 1 0 1;1 0 1 1 1 0 0 0 1 0 1 1;1 1 1 1 0 0 0 1 0 1 1 0;1 1 1 0 0 0 1 0 1 1 0 1;1 1 0 0 0 1 0 1 1 0 1 1;1 0 0 0 1 0 1 1 0 1 1 1;1 0 0 1 0 1 1 0 1 1 1 0;1 0 1 0 1 1 0 1 1 1 0 0;1 1 0 1 1 0 1 1 1 0 0 0;1 0 1 1 0 1 1 1 0 0 0 1";
71 bvec
S(12),
BS(12), r(12),
temp(12), e(24),
c(24);
85 for (
j = 0;
j < 12;
j++) {
104 for (
j = 0;
j < 12;
j++) {
133 it_error(
"Extended_Golay::decode(vec, bvec); soft-decision decoding is not implemented");
138 it_error(
"Extended_Golay::decode(vec, bvec); soft-decision decoding is not implemented");
Array< T > mid(int pos, int n) const
Get n elements of the array starting from pos.
Array< T > left(int n) const
Get n left elements of the array.
void set_size(int n, bool copy=false)
Resizing an Array<T>.
int length() const
Returns the number of data elements in the array object.
Extended_Golay()
Constructor.
virtual void decode(const bvec &coded_bits, bvec &decoded_bits)
Decoder. Will truncate some bits if not length = integer * 24.
virtual void encode(const bvec &uncoded_bits, bvec &coded_bits)
Encoder. Will truncate some bits if not length = integer * 12.
Definitions of some specific functions useful in communications.
Definitions of converters between different vector and matrix types.
Definition of the Extended Golay Code (24, 12, 8)
#define it_error(s)
Abort unconditionally.
int weight(const bvec &a)
Calculate the Hamming weight of a.
ITPP_EXPORT bmat eye_b(int size)
A Binary (size,size) unit matrix.
ITPP_EXPORT bvec zeros_b(int size)
A Binary vector of zeros.
Mat< bin > bmat
bin matrix
Mat< Num_T > concat_horizontal(const Mat< Num_T > &m1, const Mat< Num_T > &m2)
Horizontal concatenation of two matrices.
const Array< T > concat(const Array< T > &a, const T &e)
Append element e to the end of the Array a.
int floor_i(double x)
The nearest smaller integer.
Definitions of special vectors and matrices.