ldpc_head.h

来自「LDPC的c代码 包括编码 解码 加噪声 校验矩阵 生成矩阵」· C头文件 代码 · 共 44 行

H
44
字号
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <iostream.h>
#include <string.h>

#define limit	1e-50
#define pi		3.1415926
#define iterative_num	50
#define MAX		1e10



struct matrix_bit
{
	unsigned int N;     //the blocklength of the codeword
	unsigned int M1;    //the number of message bits of a codeword
	unsigned int M;     //rows of parity check matrix H
	unsigned int G_mcw; //the max column weight of G
	unsigned int H_mrw; //the max row weight of H
	unsigned int *H;    //the parity check matrix
	unsigned int *G;    //the generator matrix
};

struct code
{
	unsigned int length;
	double		 *codeword;
};

struct node
{
	int row;
	int col;
	struct node *left;
	struct node *right;
	struct node *up;
	struct node *down;
	double R;
	double Q;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?