Mercurial > hg > audiodb
view tabdump.cpp @ 755:37c2b9cce23a multiprobeLSH
Adding mkc_lsh_update branch, trunk candidate with improved LSH: merged trunk 1095 and branch multiprobe_lsh
author | mas01mc |
---|---|
date | Thu, 25 Nov 2010 13:42:40 +0000 |
parents | 1e6cc843563a |
children |
line wrap: on
line source
#include "lshlib.h" int main(int argc, char **argv) { if(argc < 2){ cout << "Usage: " << argv[0] << " indexfile" << endl; exit(1); } LSH* lsh = 0; lsh = new LSH(argv[1], true); // Initialize empty LSH tables if(!lsh){ cerr << "Cannot open " << argv[1] << endl; exit(1); } char buf[1024]; int n; while(1){ printf("row#"); fflush(stdout); scanf("%s", &buf); if(strcmp("exit", buf)==0 || strcmp("quit", buf)==0){ exit(0); } n = atoi(buf); printf("*** LSH DISK ***\n"); lsh->dump_disk_row(argv[1], n); printf("*** LSH CORE (ARRAY) ***\n"); lsh->dump_core_row(n); } return 0; }