forked from ADAPTLab/MuDBSCAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMuC_RTree.h
73 lines (65 loc) · 4.02 KB
/
MuC_RTree.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
Algorithm: Micro-cluster based DBSCAN
Author: Aditya Sarma
email: [email protected]
*/
#ifndef GRIDRTREE_H
#define GRIDRTREE_H
#include "GList.h"
#include "MuC_RTree.h"
#include "RTree.h"
#include <vector>
double distance(DataPoint point1, DataPoint point2);
void insertGroupIntoGroupList(Group newGroup);
void insertPointintoGroup(DataHdr dataList, Group currGroup, Data currDataPoint);
Boolean GisOverLap(Region rgnRectOne, Region rgnRectTwo);
Boolean GisOverLapTotal(Region rgnRectOne, Region rgnRectTwo);
Boolean GisOverLap2(Region rgnRectOne, Region rgnRectTwo);
Region GinitRgnRect(Dimension iBottomLeft, Dimension iTopRight);
GTreeNode GinitIntNd(Dimension iBottomLeft, Dimension iTopRight);
GTreeNode GinitExtNd(Group groupElem);
void GsetRect(GLstNd lstNd, GTreeNode tnInfo);
GLstNd GpickChild(GHdrNd ptrChildLst, GTreeNode tnInfo);
Boolean GexpansionArea(Region rgnRect, GTreeNode tnInfo, Double ptrDMinExp, Region rgnNewRect);
double Garea(Region rgnRect);
Boolean GinsertTree(GHdrNd hdrNdTree, GTreeNode tnInfo, int gMinEntries, int gMaxEntries);
GHdrNd GcreateRoot(GHdrNd hdrNdTree);
void GsplitNode(GLstNd ptrChild, int gminEntries);
void GpickSeeds(GHdrNd ptrChildLst, GLstNd *lstNdChildOne, GLstNd *lstNdChildTwo);
int GisContainsCell(Region rgnRect, Group group);
Group GfindCell(GHdrNd hdrNdTree, Region rgnRect);
void GprintTree(GHdrNd hdrNdTree);
void GprintRegion(Region region);
void GgetNeighborHood(GHdrNd hdrNdTree, Data currDataPoint);
void appendNbh(Data currDataPoint, Data temp);
unsigned int GfindOverlappingCells(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList);
Boolean GisOverLapTotal_MN(Region rgnRectOne, Region rgnRectTwo, BCell tempCell, int myrank);
unsigned int GfindOverlappingCellsTotalOverlap_MN(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList, BCell tempCell, int myrank);
unsigned int GfindOverlappingCellsTotalOverlap(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList);
unsigned int GfindOverlappingCellsOptimized(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList, Region halfEpsExtended);
unsigned int GfindOverlappingCells2(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList);
unsigned int GfindTotalOverlappingCells2(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList);
unsigned int GfindOverlappingCells3(GHdrNd hdrNdTree, Region rgnRect, Region cellRgnRect, BCellListHd cellsList,BCellListHd cellsList2);
void populateAuxRTrees(DataHdr dataList, struct vectorc* groupList);
void findReachableGroupsofGroupG(DataHdr dataList, GHdrNd GRTree, int i);
void findReachableMuCs(DataHdr dataList, GHdrNd GRTree, vectorc* groupList, vector< vector<int> >* p_cur_insert);
GHdrNd populateMuCRTree(DataHdr dataHdrLst, int gMinEntries, int gMaxEntries);
Region createCellRegOfPoint(Data currDataPoint, double eps);
Region createCellRegOfDataPoint(DataPoint currDataPoint, double eps);
GHdrNd insertGroupIntoRTree(GHdrNd hdrNdTree, Group groupNode, int gMinEntries, int gMaxEntries);
void printMinGridSize();
void printMaxGridSize();
Region getEpsExtendedRegion(Region cellRgnRect, double eps);
Region getEpsOptimalExtendedRegion(Region cellRgnRect, double eps);
Region getEpsExtendedRegionPoint(Data dataPoint, double eps);
void freeGRTree(GHdrNd hdrNdTree);
void isCorrectGRTree(GHdrNd hdrNdTree);
// vector<int> findNeighbours(GHdrNd GRTree, DataHdr dataHdrLst, int point_id, double eps);
// vector<int> findNeighbours2(DataHdr dataHdrLst, int point_id, double eps);
// vectorc* findNeighbours3(DataHdr dataHdrLst, int point_id, double eps);
// vectorc* findNeighbours2(DataHdr dataList, int pointid, double eps);
Neighbours findNeighbours3(DataHdr dataList, int pointid, double eps, vector < vector <int > >* p_cur_insert);
void findNeighboursGroup(RHdrNd hdrNdTree, Region rgnRect, Data data, Neighbours n, double eps);
Neighbours findNeighboursGroup_Core(RHdrNd hdrNdTree, Region rgnRect, Data data, Neighbours n, double eps);
//RHdrNd getAuxRTreeofNeighbors(BCell bCellElem, GHdrNd hdrNdTree);
#endif