Changeset 54 for hw

Show
Ignore:
Timestamp:
10/02/07 20:20:46 (5 years ago)
Author:
joeh
Message:

Better comments!

Location:
hw/hw2/MyStuff
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • hw/hw2/MyStuff/gist_private.h

    r37 r54  
    5656typedef struct GISTPQ 
    5757{ 
    58   /* fill me in! */ 
     58  /* CS186 HW2: fill me in! */ 
    5959} GISTPQ; 
    6060 
  • hw/hw2/MyStuff/gistget.c

    r53 r54  
    143143/* insert a new priority queue entry into so->pq */ 
    144144static void 
    145 gist_pq_insertpq(GISTScanOpaque so, GISTPQ *newpq) 
     145gist_pq_insertpq(GISTScanOpaque so, /* State of a GiST scan */ 
     146                 GISTPQ *newpq /* a new GISTPQ entry */ 
     147                 ) 
    146148{ 
    147149  /* CS186 HW2: fill me in! */ 
     
    150152/*  
    151153 * given the current state of the index scan, generate a GISTPQ to insert into 
    152  * the priority queue, and insert it. 
     154 * the priority queue, and insert it. Note that the "stack" holds the blocks 
     155 * from the root to the current item. 
     156 * There are two cases to consider:  
     157 *   1) the item being inserted is an entry in a leaf node, identified by a 
     158 *      block number (from the stack), and the offset.  It points to a data 
     159 *      item in the database (isdata == true). 
     160 *   2) the item being inserted is the block number of an index node to  
     161 *      be visited next (isdata == false).  The key corresponding to this  
     162 *      block number is in the block's *parent* in the tree (which can be 
     163 *      found in the stack) at the given offset. 
    153164 */ 
    154165static void