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

📄 class.h

📁 一个很好的vitebi编译码程序
💻 H
字号:
#include <vcl.h>
#include <stdio.h>
#include <math.h>
#include <sys\stat.h>

#include <stdlib.h>
//---------------------------------------------------------------------------
#ifndef classH
#define classH
//******************************************************************
//名称:        MCreatMatrix
//功能:        产生生成距阵
//******************************************************************
class MCreatMatrix
{
private:
public:
        unsigned char *Buffer;
        int Row,Column;
        void Input(int n0,int k0,int m,int *Member);
        __fastcall MCreatMatrix();
        __fastcall ~MCreatMatrix();
};
//******************************************************************
//名称:        MTransferState
//功能:        生成状态转移表
//******************************************************************
class MTransferState
{
private:
        int num,*out,*in;
	unsigned char *zh1,*zh2;
        int OutNum,InNum,Zh1Num,Zh2Num;
public:
        int *Buffer;
        int Row,Column;
        void Input(int n0,int k0,int m,unsigned char *Matrix);
        __fastcall MTransferState();
        __fastcall ~MTransferState();
};
//******************************************************************
//名称:        MVitebiDecode
//功能:        通用维特比译码器
//******************************************************************
class MVitebiDecode
{
private:
        int *Measurement,*State,Old,New,Row,Column,PathNum,n0,k0;
        int PathStoreLength,NowStoreLength,NowStoreSite,RemainBitLen,RemainByteLen;
        Byte *PathStore,*RemainBit,BitSite,*ByteCodeIn;
        MCreatMatrix CreatMatrix;
        MTransferState TransferState;
public:
        Byte *Buffer,*ByteBuffer;
        int BufBitLen,ByteBufLen;
        void Initial(int n,int k,int m,int *Member);
        void Input(char *Data,int BitLength);
        void ByteInput(char *Data,int ByteLength);
        __fastcall MVitebiDecode();
        __fastcall ~MVitebiDecode();

};

//**********************************************************************
//名称:MPuncturedDecoder
//功能:卷积码的增信删余译码
//**********************************************************************
class MPuncturedDecoder
{
private:
        MVitebiDecode Decoder;
        int *Measurement,*State,Old,New,Row,Column,PathNum,SendNum,k0;
        int PathStoreLength,NowStoreLength,NowStoreSite,RemainDataLen;
        Byte *PathStore,*RemainData,BitSite,*ByteCodeIn,*ReBuffer,*DivData,*PunSite;
        MCreatMatrix CreatMatrix;
        MTransferState TransferState;
        int ReBufferLen,DivDataLen;
        Byte *CodeIn;
public:
        Byte *Buffer;
        int BufferLen;

        void Initial(int n,int k,int m,int *Member,Byte *Site);
        void Input(Byte *Data,int DataLen);
        MPuncturedDecoder();
        ~MPuncturedDecoder();
};
#endif

⌨️ 快捷键说明

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