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

📄 print-pchk.c

📁 用C语言编写的LDPC译码程序
💻 C
字号:
/* PRINT-PCHK.C - Print the parity check matrix for a code. *//* Copyright (c) 2000 by Radford M. Neal  * * Permission is granted for anyone to copy, use, or modify this program  * for purposes of research or education, provided this copyright notice  * is retained, and note is made of any changes that have been made.  * * This program is distributed without any warranty, express or implied. * As this program was written for research purposes only, it has not been * tested to the degree that would be advisable in any important application. * All use of this program is entirely at the user's own risk. */#include <stdio.h>#include <stdlib.h>#include <math.h>#include "rand.h"#include "alloc.h"#include "mod2sparse.h"#include "mod2dense.h"#include "mod2convert.h"#include "rcode.h"void usage(void);/* MAIN PROGRAM. */int main( int argc,  char **argv){  mod2dense *D;  char *pchk_file;  int dprint;  dprint = 0;  if (argc>1 && strcmp(argv[1],"-d")==0)  { dprint = 1;    argc -= 1;    argv += 1;  }  if (!(pchk_file = argv[1]) || argv[2])  { usage();  }  read_pchk(pchk_file);  if (dprint)  { D = mod2dense_allocate(M,N);    mod2sparse_to_dense(H,D);    printf("\nParity check matrix in %s (dense format):\n\n",pchk_file);    mod2dense_print(stdout,D);  }  else  { printf("\nParity check matrix in %s (sparse format):\n\n",pchk_file);    mod2sparse_print(stdout,H);  }  printf("\n");  return 0;}/* PRINT USAGE MESSAGE AND EXIT. */void usage(void){ fprintf(stderr,"Usage: print-pchk [ -d ] pchk-file\n");  exit(1);}

⌨️ 快捷键说明

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