What is satellite information in data structures?

转自:What is satellite information in data structures?

Question:

Taken from Introduction to Algorithms by Thomas Cormen:

"To keep things simple, we assume, as we have for binary search trees and red-black trees, that any “satellite information” associated with a key is stored in the same node as the key. In practice, one might actually store with each key just a pointer to another disk page containing the satellite information for that key. The pseudocode in this chapter implicitly assumes that the satellite information associated with a key, or the pointer to such satellite information, travels with the key whenever the key is moved from node to node."

So I've been trying to Google the meaning of the term satellite information but I can't find any (covered by things about NASA). My understanding based on the text alone is that "satellite information" is an address to the location of the actual key value like a pointer? Am I correct or did I misunderstand it?

EDIT: What makes it different from a key?


Answer:

Satellite data refers to any "payload" data which you want to store in your data structure and which is not part of the structure of the data structure. It can be anything you want. It can be a single value, a large collection of values, or a pointer to some other location that holds the value.

For example, here's a list node for a singly linked list whose satellite data is a single integer:

struct node
{
    node * next;
    int satellite;
};

In other words, the whole value of any given data structure lies in the data which it contains, which is the satellite data in your book's terminology. The data structure will additionally consume structural data (like the next pointer in the example) to perform the algorithms which define it, but those are essentially "overhead" from the user's perspective.

For associative containers, the "key" value performs a dual role: On the one hand it is user data, but on the other hand it is also part of the structure of the container. However, a tree can be equipped with additional satellite data, in which case it becomes a "map" from key data to satellite data.

At one extreme you have a fixed-size array which has no overhead and only payload data, and on the other extreme you have complicated structures like multiindexes, tries, Judy arrays, or lockfree containers which maintain a comparably large amount of structural data.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值