Mercurial > hg > audiodb
view tabdump.cpp @ 560:11ea54a02534 multiprobeLSH
Added a test program and lshlib functionality to inspect on-disk and in-core hashtable representations.
author | mas01mc |
---|---|
date | Sun, 22 Feb 2009 03:44:25 +0000 |
parents | |
children | 1e6cc843563a |
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("row=%d\n", n); lsh->dump_disk_row(argv[1], n); lsh->dump_core_row(n); } return 0; }