- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用 Schifra Reed-Solomon error correcting code library在一个项目中。我对 Reed-Solomon 代码和 Galois 域的工作原理一无所知。我无法计算出 16 位符号(字段描述符)的 generator_polynomial_index 的理想值。
我的代码适用于索引 0 和许多其他索引。我已经尝试了索引的所有值。该代码适用于其中很多(准确地说是 0-32724 和 32779-65485)但是
field_descriptor = symbol size(bits/symbol)
code_length(Total number of symbols(data symbols + error-correction code symbols)) = 2^symbol_size - 1(库只支持这个值的code length)
generator_polynomial_root_count = fec_length(冗余度或纠错符号数)
错误以符号而不是位来衡量,即特定符号中 1 个不正确的位计为 1 个错误。但即使所有 16 位都不正确;它会算作 1 个错误(不是 16 个)。
可修正的最大错误数和删除数应满足以下不等式:2*num_errors + num_erasures < fec_length
如有不妥请指正
const std::size_t field_descriptor = 16;
const std::size_t generator_polynomial_index = index;
const std::size_t generator_polynomial_root_count = 50;
/* Reed Solomon Code Parameters */
const std::size_t code_length = 65535;
const std::size_t fec_length = 50;
const std::size_t data_length = code_length - fec_length;
/* Instantiate Finite Field and Generator Polynomials */
const schifra::galois::field field(field_descriptor,
schifra::galois::primitive_polynomial_size14, schifra::galois::primitive_polynomial14);
最佳答案
what is the ideal value of the generator_polynomial_index
可能没有“理想”值。
我不得不查看github代码以确定生成器字段索引是生成器多项式的第一个连续根的日志。
通常索引为 0(第一个连续的根 == 1)或 1(第一个连续的根 == Alpha(字段原语))。选择 index = 1 用于“狭义”代码。它稍微简化了 Forney 算法。链接到 wiki 文章,其中“c”代表第一个连续根的日志(它将根列为 a^c、a^(c+1)、...):
https://en.wikipedia.org/wiki/Forney_algorithm
为什么要使用狭义代码:
对于硬件,可以通过使用自倒数生成多项式来减少唯一系数的数量,其中选择第一个连续的根,以便生成多项式的形式为:1 x^n + a x^(n- 1) + b x^(n-2) + ... + b x^2 + a x + 1。对于 GF(2^16) 中的 32 个根,第一个连续的根是 alpha^((65536-32)/2) = alpha^32752,最后一个连续的根将为 alpha^32783。请注意,这仅适用于二进制字段 GF(2^n),而不适用于非二进制字段,例如 GF(929)(929 是质数)。该问题显示了不包括 32752 的索引范围;如果 32752 不适用于此库,那是由于库中的某些限制,而不是 Reed Solomon 纠错算法。
除了这 3 种情况,index = 0、1 或自倒数生成多项式,我不知道有任何理由选择不同的索引。索引的选择不太可能对尝试超出正常限制的解码产生任何影响。
The maximum number of errors and erasures which can be rectified should obey the following inequality: 2*num_errors + num_erasures < fec_length
应该是
2*num_errors + num_erasures <= fec_length
关于c++ - Reed-Solomon 纠错码的 Schifra 库中生成多项式索引的理想值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57706335/
我正在尝试使用 Schifra Reed-Solomon error correcting code library在一个项目中。我对 Reed-Solomon 代码和 Galois 域的工作原理一无
我目前正在尝试让 schifra 库运行,以便进行一些测试以便稍后在我的代码中实现它。 我目前正在查看 schifra_reed_solomon_example02.cpp 并尝试了解我必须如何设置值
我是一名优秀的程序员,十分优秀!