The Random Access Zipper:简单的纯功能序列
The Random Access Zipper: Simple, Purely-Functional Sequences
摘要:
我们介绍了随机存取拉链(RAZ),一个简单的,纯功能的数据结构的可编辑序列。RAZ结合了zipper和tree的结构:像zipper一样,在光标处进行编辑需要恒定的时间;通过利用树结构,在序列中重新定位编辑光标需要对数时间。虽然现有的数据结构提供了这些时间界限,但是没有一个数据结构具有与RAZ相同的代码简单性和简洁性。RAZ的简单性为更多的程序员提供了根据自己的需要扩展结构的机会,我们提供了一些如何做到这一点的建议。
英文摘要:
We introduce the Random Access Zipper (RAZ), a simple, purely-functional data structure for editable sequences. A RAZ combines the structure of a zipper with that of a tree: like a zipper, edits at the cursor require constant time; by leveraging tree structure, relocating the edit cursor in the sequence requires logarithmic time. While existing data structures provide these time bounds, none do so with the same simplicity and brevity of code as the RAZ. The simplicity of the RAZ provides the opportunity for more programmers to extend the structure to their own needs, and we provide some suggestions for how to do so.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。