该数据结构或使用序列成员之间相对差异的技术的名称是什么

发布于 2024-07-07 06:19:17 字数 185 浏览 3 评论 0原文

假设我有一系列值(例如,3、5、8、12、15),并且我想偶尔将它们全部减少某个值。

如果我将它们存储为序列 (0, 2, 3, 4, 3) 并将变量保留为 3 的基数,那么现在只要我想减少它们,我只需更改基数(并检查第一项)实际检查所有值。

我知道有一个官方术语,但是当我从我的母语逐字翻译成英语时,结果并不正确。

Let's say I have a sequence of values (e.g., 3, 5, 8, 12, 15) and I want to occasionally decrease all of them by a certain value.

If I store them as the sequence (0, 2, 3, 4, 3) and keep a variable as a base of 3, I now only have to change the base (and check the first items) whenever I want to decrease them instead of actually going over all the values.

I know there's an official term for this, but when I literally translate from my native language to English it doesn't come out right.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浊酒尽余欢 2024-07-14 06:19:17

差分编码 / Delta 编码

我不知道数据结构的名称,但它基本上只是基数+偏移量:-)

Differential Coding / Delta Encoding?

I don't know a name for the data structure, but it's basically just base+offset :-)

终难遇 2024-07-14 06:19:17

偏移量?

An offset?

昔梦 2024-07-14 06:19:17

如果我正确理解你的问题,那么你正在重新定位。 这通常用于参考从加载地址修补 DLL 中的地址

我不确定这就是你在做什么,因为你的例子似乎不正确。 为了得到以 3 为底的 { 3, 5, 8, 12, 15 },您需要 { 0, 2, 5, 9, 12 }。

If I understand your question right, you're rebasing. That's normally used in reference to patching up addresses in DLLs from a load address.

I'm not sure that's what you're doing, because your example seems to be incorrect. In order to come out with { 3, 5, 8, 12, 15 }, with a base of 3, you'd need { 0, 2, 5, 9, 12 }.

深海夜未眠 2024-07-14 06:19:17

我不知道。 如果您将第一个数组想象为提供索引值 f(i) 的某个函数的结果,其中 f(0) 为 3,f(1) 为 5,依此类推,那么您的第二个数组正在描述函数 f` (i) 其中 f(i+1) = f(i) + f'(i) 给定 f(0) = 3。

我将其称为导数函数,其中检索原始数据的过程很简单求和函数。

更常见的情况是,您会更改 f(0) 还是从 f(i) 中检索值? 这项技术是否源于优化的愿望?

也许您正在寻找“归纳序列”或“归纳序列”之类的术语。 (我刚刚编出来的。)

I'm not sure. If you imagine your first array as providing the results of some function of an index value f(i) where f(0) is 3, f(1) is 5, and so forth, then your second array is describing the function f`(i) where f(i+1) = f(i) + f'(i) given f(0) = 3.

I'd call it something like a derivative function, where the process of retrieving your original data is simply the summation function.

What will happen more often, will you be changing f(0) or retrieving values from f(i)? Is this technique rooted in a desire to optimize?

Perhaps you're looking for a term like "Inductive Sequence" or "Induction Sequence." (I just made that up.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文