Mercurial > hg > audiodb
comparison lshlib.cpp @ 308:896679d8cc39
Added server-side loading of persistent index (LSH hashtables) via --load_index -d dbName -R radius -l sequenceLength. Queries using these parameters will lookup the memory-resident hashtable instead of loading one from disk.
| author | mas01mc |
|---|---|
| date | Thu, 07 Aug 2008 01:53:38 +0000 |
| parents | 921ba500a024 |
| children | 81ad865402e7 |
comparison
equal
deleted
inserted
replaced
| 307:d1b8b2dec37e | 308:896679d8cc39 |
|---|---|
| 402 } | 402 } |
| 403 | 403 |
| 404 // Interface to Locality Sensitive Hashing G | 404 // Interface to Locality Sensitive Hashing G |
| 405 G::G(float ww, Uns32T kk,Uns32T mm, Uns32T dd, Uns32T NN, Uns32T CC, float rr): | 405 G::G(float ww, Uns32T kk,Uns32T mm, Uns32T dd, Uns32T NN, Uns32T CC, float rr): |
| 406 H(kk,mm,dd,NN,CC,ww,rr), // constructor to initialize data structures | 406 H(kk,mm,dd,NN,CC,ww,rr), // constructor to initialize data structures |
| 407 indexName(0), | |
| 407 lshHeader(0), | 408 lshHeader(0), |
| 408 calling_instance(0), | 409 calling_instance(0), |
| 409 add_point_callback(0) | 410 add_point_callback(0) |
| 410 { | 411 { |
| 411 | 412 |
| 415 // Read parameters from database file | 416 // Read parameters from database file |
| 416 // Load the hash functions, close the database | 417 // Load the hash functions, close the database |
| 417 // Optionally load the LSH tables into head-allocated lists in core | 418 // Optionally load the LSH tables into head-allocated lists in core |
| 418 G::G(char* filename, bool lshInCoreFlag): | 419 G::G(char* filename, bool lshInCoreFlag): |
| 419 H(), // default base-class constructor call delays data-structure initialization | 420 H(), // default base-class constructor call delays data-structure initialization |
| 421 indexName(filename), | |
| 420 lshHeader(0), | 422 lshHeader(0), |
| 421 calling_instance(0), | 423 calling_instance(0), |
| 422 add_point_callback(0) | 424 add_point_callback(0) |
| 423 { | 425 { |
| 424 int dbfid = unserialize_lsh_header(filename); | 426 int dbfid = unserialize_lsh_header(filename); |
