1Q47CA46d01 - CSE 100 W.A Burkhard Programming Assignment...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 100 Programming Assignment Two W.A. Burkhard Due: midnight Friday February 19, 2010 Brent Hashing with Passbits Brent hashing provides an excellent table implementation technique with expected access times independent of the table size. We implement an instance of the table data type using Brent hashing with passbits to determine experimentally it’s performance. Your assignment is to create the table implementation in C. Table Data Type Here is the Table header for your use. This describes the functionality you must provide within your implementation. Your implementation must work for a “generic” data type. The header file Table.h resides within our homework directory on ieng6. 1: typedef void * Table ; 2: typedef void * Data ; 3: 4: typedef struct { 5: double successful , unsuccessful ; 6: } Perform ; 7: 8: Table makeTable ( unsigned sizeTable , size_t sizeData , 9: unsigned (*hash)() , int (*diff)() , void * (*copy)() , void (*free)() ) ; 10: 11: void clearTable ( Table table ) ; 12: 13: void freeTable ( Table * tptr ) ; 14: 15: boolean insertTable ( Table table , Data data ) ; 16: 17: boolean accessTable ( Table table , Data data ) ; 18: 19: Perform performTable ( Table table ) ; 20: 21: unsigned testLoc ( Table table , Data data ) ; The Table data type contains five ordinary methods as well as two especially for the course. The makeTable method arguments include the size of the table, the size of the data items as well as four functions to manipulate records associated with the structure. Your Table user manual is to describe these functions. The sizeTable value designates the number of buckets in the table, sizeData designates the size (in bytes) of the variety of data objects to be stored, the hash function serves as the hash function mapping keys to unsigned values, diff determines the difference between the keys of two data objects, and finally the copy function copies one data object to another. The diff and hash functions implicitly define the notion of key for the records.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern