-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplit.c
More file actions
35 lines (29 loc) · 717 Bytes
/
Split.c
File metadata and controls
35 lines (29 loc) · 717 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
30
31
32
33
34
35
#include "Split.h"
struct Split{
Shapelet shapelet;
double distance_threshold;
double gain;
double gap;
DistanceMap distance_map;
};
Split createSplit(TimeSerie shapelet, double distance, double gain, double gap, DistanceMap distance_map){
Split result = malloc(sizeof(*result));
result->shapelet = shapelet;
result->distance_threshold = distance;
result->gain = gain;
result->gap = gap;
result->distance_map = distance_map;
return result;
}
double getGain(Split split){
return split->gain;
}
double getGap(Split split){
return split->gap;
}
double getThreshold(Split split){
return split->distance_threshold;
}
DistanceMap getSplitDistanceMap(Split s){
return s->distance_map;
}