⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldpc_head.h

📁 LDPC的完整c语言开发源程序代码
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -