Mercurial > hg > audiodb
comparison audioDB.cpp @ 659:536cfa209e7f
Sampling enhancements
Allow specification of a key with -k for doing sampling between a single
datum and the rest of the database. (The implementation is slightly
icky, as mentioned in the previous commit message; hopefully this
situation will not remain for too long).
While we're at it, allow -r/--resultlength as a synonym for --nsamples
(if --nsamples is not given) in order better to reflect the analogy
between querying and sampling.
author | mas01cr |
---|---|
date | Tue, 05 Jan 2010 16:44:06 +0000 |
parents | 2a97f3f9a6ac |
children | a35ca2d5f238 |
comparison
equal
deleted
inserted
replaced
658:e7fae71ee676 | 659:536cfa209e7f |
---|---|
330 dbName = args_info.database_arg; | 330 dbName = args_info.database_arg; |
331 sequenceLength = args_info.sequencelength_arg; | 331 sequenceLength = args_info.sequencelength_arg; |
332 if(sequenceLength < 1 || sequenceLength > 1000) { | 332 if(sequenceLength < 1 || sequenceLength > 1000) { |
333 error("seqlen out of range: 1 <= seqlen <= 1000"); | 333 error("seqlen out of range: 1 <= seqlen <= 1000"); |
334 } | 334 } |
335 nsamples = args_info.nsamples_arg; | 335 if(args_info.nsamples_given) { |
336 nsamples = args_info.nsamples_arg; | |
337 } else if(args_info.resultlength_given) { | |
338 nsamples = args_info.resultlength_arg; | |
339 } else { | |
340 nsamples = args_info.nsamples_arg; | |
341 } | |
342 if(args_info.key_given) { | |
343 query_from_key = true; | |
344 key = args_info.key_arg; | |
345 } | |
346 | |
347 | |
336 return 0; | 348 return 0; |
337 } | 349 } |
338 | 350 |
339 if(args_info.DUMP_given){ | 351 if(args_info.DUMP_given){ |
340 command=COM_DUMP; | 352 command=COM_DUMP; |