-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvladRootIDF.hpp
More file actions
29 lines (22 loc) · 993 Bytes
/
vladRootIDF.hpp
File metadata and controls
29 lines (22 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// vladRootIDF.hpp
// FVector
//
// Created by LuDong on 2018/2/9.
// Copyright © 2018年 LuDong. All rights reserved.
//
#ifndef vladRootIDF_hpp
#define vladRootIDF_hpp
#include <stdio.h>
#include "vlad.h"
#include "hikmeans.h"
#include "ikmeans.h"
#include "comm.hpp"
//init hikmTree using center data saved in HDF5
VlHIKMNode *initTreeUsingCenters (VlHIKMTree *tree, vl_int32 *data, int &count, vl_size subTrees, vl_size height);
//get the leaf node of kd-tree, and store to leafCenters, by index, vl_int32-->float, due to vlad
void getLeafCenters(VlHIKMNode *node, int &subTrees, float *leafCenters, int &count, vl_size height);
//root node has 3 centers, the penultimate layer node also has 3 centers, traverse only reach penultimate layer
//the center(uint_8) (e.g.:122) but to calculate mean, so change to uint32 in function vl_ikm_get_centers(e.g.:122,0,0,0)
void traverseTree(VlHIKMNode *node, int &subTrees, int *hikmCenters, int &count);
#endif /* vladRootIDF_hpp */