Partially Persistent DictionariesThe data type pp_dictionary is a variant of Dictionaries . It can be used to store objects of an arbitrary type I together with an associated key of a linearly ordered type K (int, string,Partially Persistent Dictionaries are also closely related to Persistent Dictionaries. Remark: The interface of Persistent
Dictionaries is a little different from Dictionaries
and Partially Persistent Dictionaries. The update operations of Persistent
Dictionaries return a new dictionary while the corresponding operations
of Dictionaries and Partially Persistent Dictionaries return an item,
respectively Basic Idea You want to store your objects with associated keys of a linearly ordered
type in a Dictionary, but you also want to save the history of updates.
You want to ask, for example, You can use Partially Persistent Dictionaries in exactly the same way
as Dictionaries. If you want to store a version you simply define another
If one of the two Complete Example of Partially Persistent Dictionaries ... ApplicationsSome sweep algorithms for segment intersection need persistent data structures.TipUse a Partially Persistent Dictionaries if you only need to access, but not change, previous versions. If you need to change more than the newest copy use the data type Persistent Dictionary. |
See also:Manual Entries: Manual Page Partially Persistent Dictionaries |