Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deltapq_approx_tree_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ int main(int argc, char* argv[]){
int M_arg;
M_arg = PQ_M + sizeof(int);
diff_argument = PQ_M + sizeof(int);
m_sub_distances = new float*[PQ_M]; // m_sub_distances defined in .h file
for (int i = 0; i < PQ_M; i++) {
m_sub_distances[i] = new float[PQ_K];
memset(m_sub_distances[i], 0, sizeof(float)*PQ_K);
}
bool file_read = create_approx_tree(dataset, vecs, dummycodes,
dummymarks, M_arg, PQ_K, num_codes, diff_argument,
nodes, m_sub_distances,
Expand Down
3 changes: 0 additions & 3 deletions pq_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,6 @@ vector<pair<int, float> > PQTree::SampledQuery(vector<float> &query, int id) {
return results;
}
#ifdef PLAIN_PQ
auto comp_max_heap = [](const pair<int, float> &a, const pair<int, float> &b) {
return a.second < b.second;
};
void print_heap(vector<pair<int, float>>& test) {
for (int i = 0; i < test.size(); i ++) {
cout << test[i].first << ", " << test[i].second << " ";
Expand Down