9#ifndef INCLUDED_fec_mtrx_H
10#define INCLUDED_fec_mtrx_H
37typedef std::shared_ptr<matrix> matrix_sptr;
40typedef std::shared_ptr<fec_mtrx> fec_mtrx_sptr;
132 virtual void encode(
unsigned char* outbuffer,
133 const unsigned char* inbuffer)
const = 0;
136 virtual void decode(
unsigned char* outbuffer,
137 const float* inbuffer,
138 unsigned int frame_size,
139 unsigned int max_iterations)
const = 0;
142 virtual unsigned int n()
const = 0;
145 virtual unsigned int k()
const = 0;
Base class for FEC matrix objects.
Definition: fec_mtrx.h:124
virtual ~fec_mtrx()
Definition: fec_mtrx.h:129
virtual void decode(unsigned char *outbuffer, const float *inbuffer, unsigned int frame_size, unsigned int max_iterations) const =0
Decode inbuffer with LDPC H matrix into outbuffer.
virtual unsigned int k() const =0
Get the information word length k.
virtual unsigned int n() const =0
Get the codeword length n.
virtual void encode(unsigned char *outbuffer, const unsigned char *inbuffer) const =0
Encode inbuffer with LDPC H matrix into outbuffer.
fec_mtrx(void)
Definition: fec_mtrx.h:126
#define FEC_API
Definition: gr-fec/include/gnuradio/fec/api.h:18
FEC_API matrix_sptr generate_H(matrix_sptr G_obj)
Takes a generator matrix (G) and returns the parity check matrix (H).
FEC_API void print_matrix(const matrix_sptr M, bool numpy=false)
Takes a matrix and prints it to screen.
FEC_API void write_matrix_to_file(const std::string filename, matrix_sptr M)
FEC_API matrix_sptr read_matrix_from_file(const std::string filename)
Read in an alist file and produce the matrix object.
FEC_API matrix_sptr generate_G_transpose(matrix_sptr H_obj)
Takes a parity check matrix (H) and returns the transpose of the generator matrix (G).
FEC_API void matrix_free(matrix *x)
FEC_API matrix_sptr generate_G(matrix_sptr H_obj)
Takes a parity check matrix (H) and returns the generator matrix (G).
GNU Radio logging wrapper.
Definition: basic_block.h:29
Definition: fec_mtrx.h:21
size_t size
Definition: fec_mtrx.h:22
double * data
Definition: fec_mtrx.h:23
Definition: fec_mtrx.h:26
size_t size1
Definition: fec_mtrx.h:27
double * data
Definition: fec_mtrx.h:30
size_t tda
Definition: fec_mtrx.h:29
int owner
Definition: fec_mtrx.h:32
size_t size2
Definition: fec_mtrx.h:28
block_data * block
Definition: fec_mtrx.h:31