forked from psudmant/ssf_DTS_caller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
edge.cc
61 lines (50 loc) · 1.17 KB
/
edge.cc
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
#include "edge.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
edge::edge(){
}
bool edge::operator<(edge &other){
if (delta <other.delta){
return true;
}else{
return false;
}
}
void edge::recalculate_delta(){
delta = std::abs(right_median-left_median);
data = delta;
}
edge::edge(long int _pos,
long int _left_epos,
long int _right_epos,
float _delta,
float _left_median,
float _right_median){
pos = _pos;
left_epos = _left_epos;
right_epos = _right_epos;
delta = _delta;
left_median = _left_median;
right_median = _right_median;
data = delta;
}
edge::~edge(){
}
void edge::edge_init(long int _pos,
long int _left_epos,
long int _right_epos,
float _delta,
float _left_median,
float _right_median){
pos = _pos;
left_epos = _left_epos;
right_epos = _right_epos;
delta = _delta;
left_median = _left_median;
right_median = _right_median;
data = delta;
}
void edge::getValStr(int width, char * c){
sprintf(c,"%*.*f",width,width,delta);
}