binlfsr.h

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

H
33
字号
// BinLFSR.h -- declarations for BinLFSR class// Todd K. Moon// Copyright 2004 by Todd K. Moon// Permission is granted to use this program/data// for educational/research only#ifndef BinLFSR_H#define BinLFSR_Hclass BinLFSR {   int g;   int state;   int mask;   int mask1;   int n;public:   BinLFSR(void) { g=n=state=mask=mask1=0;}// default constructor   BinLFSR(int g, int n, int initstate=1);// constructor   ~BinLFSR() {};                        // destructor   void setstate(int state);             // set the state   char step(void);                      // step once; return output   char step(int &state);                // step once; return output and state   void steps(int nstep, char *outputs); // step nstep times};#endif/*Local Variables:compile-command: "gcc -c -g BinLFSR.cc"End:*/

⌨️ 快捷键说明

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