← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 743.d.6.l · 生成模型:未记录

成对迭代实现线性预测

理解等级:中级

线性预测用前面若干样本乘各自系数后求和,估计当前一个样本。对长度相等的两组序列,先 zip 对齐系数与历史样本,再 map 求乘积,最后用 sum 得到加权总量。解码器再右移缩放并加入该样本的差值。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《The Rust Programming Language(第2版)》第13章 函数式语言特性:迭代器与闭包(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c13.xhtml`,块 0207) - 结论依据:原文按 zip、乘积、求和与位移解释预测步骤。 - 原始内容:To calculate the value of prediction, this code iterates through each of the 12 values in coefficients and uses the zip method to pair the coefficient values with the previous 12 values in buffer. Then, for each pair, it multiplies the values together, sums all the results, and shifts the bits in the sum qlp_shift bits to the right.