Mercurial > hg > audiodb
comparison audioDB.cpp @ 696:bb9478d5b57e
support distinction between exhaustive / nonexhaustive sampling
Only for when a datum is given (either as key or -- upcoming -- as
double float data, e.g. from a feature file).
| author | mas01cr |
|---|---|
| date | Thu, 22 Apr 2010 21:04:04 +0000 |
| parents | 01e25f938b63 |
| children | 2741bbda39d7 |
comparison
equal
deleted
inserted
replaced
| 695:01e25f938b63 | 696:bb9478d5b57e |
|---|---|
| 339 } | 339 } |
| 340 if(args_info.key_given) { | 340 if(args_info.key_given) { |
| 341 query_from_key = true; | 341 query_from_key = true; |
| 342 key = args_info.key_arg; | 342 key = args_info.key_arg; |
| 343 } | 343 } |
| 344 | 344 if(!args_info.exhaustive_flag){ |
| 345 queryPoint = args_info.qpoint_arg; | |
| 346 usingQueryPoint=1; | |
| 347 if(queryPoint<0 || queryPoint >O2_MAX_VECTORS) | |
| 348 error("queryPoint out of range: 0 <= queryPoint <= O2_MAX_VECTORS"); | |
| 349 } | |
| 350 | |
| 345 | 351 |
| 346 return 0; | 352 return 0; |
| 347 } | 353 } |
| 348 | 354 |
| 349 if(args_info.DUMP_given){ | 355 if(args_info.DUMP_given){ |
| 1070 } | 1076 } |
| 1071 | 1077 |
| 1072 if(query_from_key) { | 1078 if(query_from_key) { |
| 1073 datum.key = key; | 1079 datum.key = key; |
| 1074 spec.qid.datum = &datum; | 1080 spec.qid.datum = &datum; |
| 1075 spec.qid.flags |= ADB_QID_FLAG_EXHAUSTIVE; | |
| 1076 spec.refine.flags |= ADB_REFINE_EXCLUDE_KEYLIST; | 1081 spec.refine.flags |= ADB_REFINE_EXCLUDE_KEYLIST; |
| 1077 spec.refine.exclude.nkeys = 1; | 1082 spec.refine.exclude.nkeys = 1; |
| 1078 spec.refine.exclude.keys = &key; | 1083 spec.refine.exclude.keys = &key; |
| 1079 } else if(inFile) { | 1084 } else if(inFile) { |
| 1080 error("sample from feature file not supported (yet)"); | 1085 error("sample from feature file not supported (yet)"); |
