Mercurial > hg > audiodb
view pointpair.cpp @ 530:aa715b3e18db multiprobeLSH
Completed audiodb_datum_qpointers_partial(), fixed bug that was scribbling over pre-computed l2norms when points arrived in original less<PointPair> order, switched to greater<PointPair> order and all is fixed.
author | mas01mc |
---|---|
date | Fri, 30 Jan 2009 19:44:51 +0000 |
parents | cc2b97d020b1 |
children | 9119f2fa3efe |
line wrap: on
line source
extern "C" { #include "audioDB_API.h" } #include "audioDB-internals.h" PointPair::PointPair(Uns32T a, Uns32T b, Uns32T c) : trackID(a), qpos(b), spos(c) { }; bool operator<(const PointPair& a, const PointPair& b) { return ((a.trackID < b.trackID) || ((a.trackID == b.trackID) && ((a.spos < b.spos) || ((a.spos == b.spos) && (a.qpos < b.qpos))))); } bool operator>(const PointPair& a, const PointPair& b) { return ((a.trackID > b.trackID) || ((a.trackID == b.trackID) && ((a.spos > b.spos) || ((a.spos == b.spos) && (a.qpos > b.qpos))))); } bool operator==(const PointPair& a, const PointPair& b) { return ((a.trackID == b.trackID) && (a.qpos == b.qpos) && (a.spos == b.spos)); }