Mercurial > hg > audiodb
comparison audioDB.cpp @ 50:4d9ea08b2f5f
Fix bug revealed by test case 0005: L2NORM needs write access to the
database.
author | mas01cr |
---|---|
date | Tue, 18 Sep 2007 09:31:41 +0000 |
parents | bc84daa6c362 |
children | 944f05e65a58 |
comparison
equal
deleted
inserted
replaced
49:53616d7dda08 | 50:4d9ea08b2f5f |
---|---|
969 | 969 |
970 status(dbName); | 970 status(dbName); |
971 } | 971 } |
972 | 972 |
973 void audioDB::l2norm(const char* dbName){ | 973 void audioDB::l2norm(const char* dbName){ |
974 initTables(dbName, 0, 0); | 974 initTables(dbName, true, 0); |
975 if(dbH->length>0){ | 975 if(dbH->length>0){ |
976 unsigned numVectors = dbH->length/(sizeof(double)*dbH->dim); | 976 unsigned numVectors = dbH->length/(sizeof(double)*dbH->dim); |
977 unitNormAndInsertL2(dataBuf, dbH->dim, numVectors, 0); // No append | 977 unitNormAndInsertL2(dataBuf, dbH->dim, numVectors, 0); // No append |
978 } | 978 } |
979 // Update database flags | 979 // Update database flags |