Mercurial > hg > audiodb
comparison query.cpp @ 424:c6046dd80570 api-inversion
Accumulators everywhere!
Now all codepaths go through accumulators, and the reporter is only used
right at the very end.
author | mas01cr |
---|---|
date | Wed, 24 Dec 2008 10:55:12 +0000 |
parents | b09d2eb1a2b2 |
children | d65410f4bb85 |
comparison
equal
deleted
inserted
replaced
423:b09d2eb1a2b2 | 424:c6046dd80570 |
---|---|
637 else | 637 else |
638 if(no_unit_norming) | 638 if(no_unit_norming) |
639 dist = qn*qn + sn*sn - 2*dist; | 639 dist = qn*qn + sn*sn - 2*dist; |
640 // else | 640 // else |
641 // dist = dist; | 641 // dist = dist; |
642 if((!radius) || dist <= (O2_LSH_EXACT_MULT*radius+O2_DISTANCE_TOLERANCE)) | 642 if((!radius) || dist <= (O2_LSH_EXACT_MULT*radius+O2_DISTANCE_TOLERANCE)) { |
643 reporter->add_point(pp.trackID, pp.qpos, pp.spos, dist); | 643 adb_result_t r; |
644 r.key = fileTable + pp.trackID * O2_FILETABLE_ENTRY_SIZE; | |
645 r.dist = dist; | |
646 r.qpos = pp.qpos; | |
647 r.ipos = pp.spos; | |
648 accumulator->add_point(&r); | |
649 } | |
644 } | 650 } |
645 exact_evaluation_queue->pop(); | 651 exact_evaluation_queue->pop(); |
646 } | 652 } |
647 // Cleanup | 653 // Cleanup |
648 SAFE_DELETE_ARRAY(sNorm); | 654 SAFE_DELETE_ARRAY(sNorm); |