tailieunhanh - HandBooks Professional Java-C-Scrip-SQL part 160
Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 160', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | count to 10 000 despite the fact that the quantum number field in the item reference class can handle a file with far more quanta. However if our application needs so much data that a 160-MB maximum file size is too small the extra space taken up by a larger free space list probably isn t an obstacle. Summary In this chapter we have used the quantum file access method as the base for a diskbased variant of Larson s dynamic hashing. This algorithm provides efficient hash-coded access by key to a very large amount of variable-length textual data while eliminating the traditional drawbacks of hashing especially the need to specify the maximum size of the file in advance. In the final chapter we will summarize the algorithms we have covered in this book and discuss some other resources we can use to improve the efficiency of our programs. Problems 1. What modifications to the dynamic hashing implementation would be needed to add the following capabilities 1. Shrinking the file when deleting records 2. Storing and retrieving records with duplicate keys. 2. How could the PersistentArrayUlong class be generalized to other data types You can find suggested approaches to problems in Chapter . Footnotes 1. William G. Griswold and Gregg M. Townsend The Design and Implementation of Dynamic Hashing for Sets and Tables in Icon . Software Practice and Experience 23 April 1993 351-367. 2. In case you re thinking that the availability of virtual memory will solve this problem by allowing us to pretend that we have enough memory to hold the lists no matter how large they get you may be surprised to discover that the performance of such an algorithm in virtual memory is likely to be extremely poor. I provide an example of this phenomenon in my previously cited article Galloping Algorithms . 3. . Larson Dynamic Hash Tables . Communications of the ACM 31 1988 . 4. Of course thinking them up in the first place is a little harder 5. This step alone will probably not .
đang nạp các trang xem trước