📄 kva.h
字号:
#ifndef _KVA
#define _KVA
#include <stdlib.h>
#include "BiPolynom.h"
#include "RSParam.h"
#include "RSDecoder.h"
#ifdef _DEBUG
//int faultframes=0;
#endif
/*在重数分配算法中不同的迭代终止判据*/
enum MPAStopCondit{
GivenS, //指定重数总和(KV重数分配方案)
GivenL, //指定最终列表的容量
GivenC, //指定Cost
GivenM, //固定每个插值点上的重数都为m
GivenLambda //指定lambda(Gross重数分配方案)
};
/*
struct KVAParam {
MPAStopCondit MPAStopType;
int MPAThreshold;
};
*/
struct KVAMember {
//RS Parameters:
int Q;
int N;
int K;
GF gf;
MPAStopCondit MPAStopCdt;
float MPAThres;
//用于重数分配算法的:
int MaxC;
int *M_1D;
double *P;
int *s, *t, *r;
int* indx;
//用于Interpolation的:
int MaxDX, MaxDY;
BiPolynom* g;
int* WD;
GFE* delta;
//用于Y-root Factorization的:
Polynom *YRoots;
Polynom *roots;
BiPolynom *Q0;
Polynom f;
bool* equalroot;
//在各个yroots之间以最大似然原则进行比较
GFE* MLCode;
};
extern DecAlgInterface InitKVA(const RSCodeParam& rsp, MPAStopCondit MPAStopCdt, float MPAThres);
extern void CloseKVA(void* A);
extern bool DecodeOneWord_KVA(GFE* C, const double* reliabMat, const RSCodeParam& rsp,void* KVARegs);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -