testbinlfsr.cc.txt

来自「压缩文件中是Error Correction Coding - Mathemat」· 文本 代码 · 共 43 行

TXT
43
字号
//  Program: BinLFSR.cc////  Todd K. Moon//// Copyright 2004 by Todd K. Moon// Permission is granted to use this program/data// for educational/research only#include <iostream>using namespace std;extern "C" {#include <stdio.h>}#include "BinLFSR.h"int main(){   int g = 0x17; // 10111 = 1+d+d^2+d^4   // int g = 0x13; // 10011 = 1+d+d^4   int Nsteps = 16;   BinLFSR X(g,4);   int i;   char out;   int state;   for(i = 0; i < Nsteps; i++) {	  out = X.step(state);	  cout << out << " " << state << "\n";   }}/*Local Variables:compile-command: "g++ -o testBinLFSR -g testBinLFSR.cc BinLFSR.cc"End:*/

⌨️ 快捷键说明

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