; Demo script 2 ; ; Specify boundaries of coordinate space: world 1091500W 1014500W 331500N 444500N ; ; Import a sizeable number of records: import COOuray.txt ; ; Uncomment if you want to take a look at the indices: ;debug quad ;debug hash ; ; Perform some searches by name/state: what_is United States Mountain CO what_is Full Moon Gulch CO what_is Spruce Mountain CO what_is Hendrick Gulch CO what_is Chicago Tunnel CO what_is Telluride Peak CO what_is Baldy Peak CO what_is Portland CO what_is Alkali Creek CO what_is Wildcat Canyon CO what_is Devils Canyon CO what_is Owl Creek Pass CO ; ; Check the buffer pool. ; The student's display should show the same set of records, and ; in exactly the same order. debug pool ; ; Now let's check out the LRU ordering by repeating some searches: what_is Spruce Mountain CO what_is Baldy Peak CO ; ; Check the buffer pool. ; Now, Baldy Peak should be at the top (MRU position) and Spruce ; Mountain should be in the next position, and all the others ; should be in the same relative order as before. debug pool ; ; Perform some more searches to exactly fill up the pool: what_is Abrams Mountain CO what_is Albany Gulch CO what_is Albany Mine CO what_is Alkali Ditch Number 1 CO what_is Allegheny Mine CO what_is American Flats CO what_is Amphitheater, The CO what_is Avarado Gulch CO ; ; Check the buffer pool. It should have exactly 20 entries now. debug pool ; ; Repeat some searches to exercise the LRU ordering again: what_is United States Mountain CO debug pool what_is Avarado Gulch CO debug pool what_is Alkali Creek CO debug pool ; ; Now do some searches that will force replacements: what_is Mexican Cabin Spring CO ; Hendrick Gulch should now be at the bottom of the pool. debug pool what_is Storm King CO ; Chicago Tunnel should now be at the bottom of the pool. debug pool ; ; And, finally, one search that yields multiple hits and forces ; multiple replacements: what_is Cottonwood Creek CO ; Wildcat Canyon should now be at the bottom of the pool. debug pool ; ; Exit: quit