Mercurial > hg > audiodb
diff audioDB-internals.h @ 672:a35ca2d5f238
Extend results structure to include a key for the query.
Fill that key from the query datum, if given, defaulting to ""; patch up
bindings and tests.
This is so that (Instance x Instance) operations such as querying and
sampling can be supported.
author | mas01cr |
---|---|
date | Fri, 05 Mar 2010 16:00:53 +0000 |
parents | b82b90c6445e |
children | e1f7cab30701 |
line wrap: on
line diff
--- a/audioDB-internals.h Fri Mar 05 16:00:49 2010 +0000 +++ b/audioDB-internals.h Fri Mar 05 16:00:53 2010 +0000 @@ -123,9 +123,9 @@ typedef struct { bool operator() (const adb_result_t &r1, const adb_result_t &r2) { - return strcmp(r1.key, r2.key) < 0; + return strcmp(r1.ikey, r2.ikey) < 0; } -} adb_result_key_lt; +} adb_result_ikey_lt; typedef struct { bool operator() (const adb_result_t &r1, const adb_result_t &r2) { @@ -150,7 +150,7 @@ return ((r1.ipos < r2.ipos) || ((r1.ipos == r2.ipos) && ((r1.qpos < r2.qpos) || - ((r1.qpos == r2.qpos) && (strcmp(r1.key, r2.key) < 0))))); + ((r1.qpos == r2.qpos) && (strcmp(r1.ikey, r2.ikey) < 0))))); } } adb_result_triple_lt; @@ -168,6 +168,7 @@ std::priority_queue<PointPair> *exact_evaluation_queue; std::set< adb_result_t, adb_result_triple_lt > *set; LSH *lsh; + const char *qkey; } adb_qstate_internal_t; /* We could go gcc-specific here and use typeof() instead of passing