標題: | POOL - AN UNBOUNDED ARRAY |
作者: | WU, PC WANG, FJ 資訊科學與工程研究所 Institute of Computer Science and Engineering |
關鍵字: | DYNAMIC DATA STRUCTURES;COLLECTION OBJECTS |
公開日期: | 1-九月-1994 |
摘要: | Many collection objects, e.g., stack, can be implemented with tabular representation (an array). Such an implementation provides fast index and saves space on linked structures. However, its space is bounded at creation time. This note presents a hybrid data structure, called pool, which combines tabular and indexed data structures. A pool is a number of segments of contiguous memory space. It provides unbounded space. Its first segment is allocated initially. When more space is needed, a new segment is allocated in double size of previous segment. All segments allocated can be accessed via an index table. The size of index table is log n, where n is the number of elements. A pool can provide index operation in O(log n) and iterations almost as fast as tabular implementation. |
URI: | http://hdl.handle.net/11536/2357 |
ISSN: | 0362-1340 |
期刊: | SIGPLAN NOTICES |
Volume: | 29 |
Issue: | 9 |
起始頁: | 68 |
結束頁: | 71 |
顯示於類別: | 期刊論文 |