forked from marcelkunze/trackml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPolarModule.h
executable file
·43 lines (37 loc) · 1.06 KB
/
PolarModule.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
#ifndef _POLARMOD_H_
#define _POLARMOD_H_
// Neural Network based tracker
// The code has been adopted from Johan Sokrates Wind's award winning trackml Kaggle contribution
// M.Kunze, Heidelberg University, 2018
class Tracker;
//Levels of detail
static const int lods = 8;
class PolarModuleInternal {
public:
Tracker *tracker = NULL;
int *mem = NULL;
int *ind[lods];
int *num[lods];
int layeri, zi, aspectx, aspecty;
PolarModuleInternal(int li, int zi, Tracker *t);
void recIndex(int&i, int ix, int iy, int lod);
~PolarModuleInternal();
inline double calcX(point&p);
inline double calcX(double r);
int getNear(point&dp0, point&xp, point&bap, double tt, int*match);
};
class PolarModule {
PolarModuleInternal *internal;
int internals;
public:
PolarModule() {internal = NULL;internals = 0;}
PolarModule(int li, Tracker *t);
int getNear(point&dp, point&xp, point&bap, double tt, int*match);
~PolarModule() {
if (internal) {
delete[]internal;
internal = NULL;
}
}
};
#endif