📄 binconvfir.h
字号:
// BinConvFir.h -- declarations for an (n,k) polynomial// binary convolutional coder// Todd K. Moon// Copyright 2004 by Todd K. Moon// Permission is granted to use this program/data// for educational/research only#ifndef BINCONVFIR_H#define BINCONVFIR_H#include "BinConv.h"#include "matalloc.h" // matrix allocation stuff// The code is represented as a transfer function matrix// G = [h11 h12 ... h1n// h21 h22 ... h2n// ...// hk1 hk2 ... hkn]// // Each column of G must be an FIR filter As a result, each column is// specified by a set of h vectors (the numerators)#include "matalloc.h"class BinConvFIR : public BinConv { unsigned int **h; // encoder transfer functions (h0=lsb) int *nui; // max row degree unsigned int *mem; // state memory of encoders int maxdeg; // maximum degree of a row (used by encode)public: BinConvFIR(int in_k, int in_n, int *degs, unsigned int** h_in); ~BinConvFIR() { FREEMATRIX(h); delete[] nui; delete[] mem; }; virtual unsigned char *encode(const unsigned char *ins); // encode one step of input virtual unsigned int getstate() const; // return the state of the encoder virtual void setstate(const unsigned int state); // set the state of the encoder};#endif/*Local Variables:compile-command: "gcc -c -g BinConvFIR.cc"End:*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -