-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtree_index.h
More file actions
36 lines (29 loc) · 1.11 KB
/
Copy pathtree_index.h
File metadata and controls
36 lines (29 loc) · 1.11 KB
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
30
31
32
33
34
35
#include <vector>
#include "params.h"
//MBBS
struct Rect
{
Rect() {}
DTYPE Point[GPUNUMDIM];//point
DTYPE MBB_min[GPUNUMDIM]; //MBB min
DTYPE MBB_max[GPUNUMDIM]; //MBB max
int pid; //point id
void CreateMBB(){
for (int i=0; i<GPUNUMDIM; i++){
MBB_min[i]=Point[i];
MBB_max[i]=Point[i];
}
}
};
//neighbortable CPU -- indexmin and indexmax point to a single vector
struct neighborTableLookupCPU
{
int pointID;
int indexmin;
int indexmax;
};
void createEntryMBBs(std::vector<std::vector <DTYPE> > *NDdataPoints, Rect * dataRects);
bool DBSCANmySearchCallbackSequential(int id, void* arg);
double RtreeSearch(std::vector<std::vector <DTYPE> > *NDdataPoints, DTYPE epsilon, unsigned long int * numNeighbors);
void generateQueryMBB(std::vector<std::vector<DTYPE> > *NDdataPoints, unsigned int idx, DTYPE epsilon, DTYPE * MBB_min, DTYPE * MBB_max);
unsigned int filterCandidatesAddToTable(std::vector<std::vector<DTYPE> > *NDdataPoints, unsigned int idx, DTYPE epsilon, std::vector<unsigned int> * neighborList, neighborTableLookupCPU * neighborTable, std::vector<unsigned int > * neighborTableVect);