binconv.h
来自「压缩文件中是Error Correction Coding - Mathemat」· C头文件 代码 · 共 41 行
H
41 行
// BinConv.h -- declarations for the base class of a Binary // Convolutional encoder// This is then specialized by inheritance to FIR or IIR encoders// Todd K. Moon// Copyright 2004 by Todd K. Moon// Permission is granted to use this program/data// for educational/research only#ifndef BINCONV_H#define BINCONV_Hclass BinConv {protected: unsigned char *outs; // array of n outputspublic: int n; // number of outputs int k; // number of inputs int nu; // total of row degrees (constraint length) BinConv(int in_k, int in_n) { k = in_k; n = in_n; outs = new unsigned char[n]; // output array } ~BinConv() { delete[] outs; }; virtual unsigned char *encode(const unsigned char *ins) = 0; // encode one step of input (pure virtual) virtual unsigned int getstate() const = 0; // Get the state of the encoder virtual void setstate(const unsigned int state) = 0; // Set the state of the encoder};#endif/*Local Variables:compile-command: "gcc -c -g BinConv.cc"End:*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?