st.h

来自「Turbo码性能仿真源程序信道编码方面的」· C头文件 代码 · 共 54 行

H
54
字号

class ST
{
private:
	struct Dual
	{
		int Pos;
		int Flag;
	};
	Dual	**ReShaffleRule;
	Dual	**ImShaffleRule;

	int		Nt;
	int		DataLen;
	int		SpreadLen;
	int		StackNum;
	int		FrameLen;
	int		ChipNum;
	int		TranChipNum;

	int		**ShaffleRule;
	float	SpreadSeq[SPREADLEN];
	float	SpreadSeq2[SPREADLEN];
	float	**ExChipInfo;

	Complex	*Mean;
	Complex *Var;
	Complex ***RowMean;
	Complex ***RowVar;
	int		Check( Dual *Re, Dual *Im );
	float	ProbToMean( float Pr );
	Complex APrioriProb( Complex H, Complex R, Complex Var );

	void	MemoryAllocation( );
	void	InterleaverInit( );
	void	InterleaverSet( );
	void	RowScramable( Dual *Row );
	void	Spreader( int *intput, float *temp );
	void	Stacker( int nt, float *temp, Complex *output );
	void	StatisticOut( int nt, int row );
	void	Ext( int nt, int row, int col, Complex Y );

public:
	float	DeSpreadChipInfo[CODEWORDLEN];
	Complex FadeFactor[NT];
	Complex FadeFactor2[NT];

	void	Init( int nt, int stacknum, int framelen, int spreadlen, int datalen, int chipnum, int tranchipnum );
	void	PreProcess( float sigma );
	void	Encoder( int *input, Complex *output );
	void	Input( Complex *Sb );
	void	Output( float s2 );
	void	End( );
};

⌨️ 快捷键说明

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