Question
A private investigator has asked you to help develop software to analyse fingerprint data. The software will have access to the left and right index
A private investigator has asked you to help develop software to analyse fingerprint data. The software will have access to the left and right index fingerprints for a group of people, and also a collection of unidentified prints. The investigator wishes to know how many of the as-yet unidentified prints possibly or definitely belong to known individuals. Each person is identified by an integer ID, ranging from zero to the number of people minus one. Each unidentified print is also identified by an integer ID, in the same fashion. The left and right fingerprint data for each person is stored in a highly-reduced / compressed form a template. Each template takes only 64 bits to store. Write a C function (not a whole program) called countMatches to do the following: 1. Retrieve each persons template fingerprints using the getTemplates function, which is declared as follows: void getTemplates(int person, double* left, double* right); If getTemplates() places -1 in both *left and *right, no template fingerprint exists for that person. Such people cannot be tested, of course. For efficiency purposes, your function should skip over them. 2. If template fingerprints have been recorded for a given person, test them against each unidentified fingerprint. Your function will be supplied with a callback (function pointer) parameter for this purpose. 3. Report the total number of possible and definite fingerprint matches, via two int* (pass-by-reference) parameters. Your function should return void, and take five (5) parameters: nPeople an int, the number of people in the database; nPrints an int, the number of unidentified fingerprints; nPossible a pointer to an int, the number of possible fingerprint matches; nDefinite a pointer to an int, the number of definite fingerprint matches; and check a pointer to a function used to check fingerprint templates against unidentified prints. The callback function takes an int the ID of the unidentified print and two doubles the left and right templates. It returns one of three int values: 0, indicating no match; 1, indicating a possible match; or 2, indicating a definite match. Do not attempt to write the getTemplates() function or the callback function yourself. (These have already been implemented.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started