2 #include "Centrality.h"
4 NchCentrality centrality(
double zdcsum,
double ctbevt){
5 if (zdcsum<66 && ctbevt>8500)
7 else if (zdcsum<91 && zdcsum>=66 && ctbevt>5000)
9 else if (zdcsum<120 && zdcsum>=91 && ctbevt>2150)
11 else if (zdcsum<(120+.005*(ctbevt-2151)) && zdcsum>=120 && ctbevt>2150)
13 else if (zdcsum<(120+.022*(ctbevt-2151)) && zdcsum>=(120+.005*(ctbevt-2151)) && ctbevt>2150)
15 else if (zdcsum>=(120+.022*(ctbevt-2151)) && zdcsum>(120-.125*(ctbevt-2150)))
17 else if (zdcsum>(120-.0271*(ctbevt-2151)) && zdcsum<=(120-.125*(ctbevt-2150)))
19 else if (zdcsum>(120-.0142*(ctbevt-2151)) && zdcsum<=(120-.0271*(ctbevt-2151)))
21 else if (zdcsum>(120-.0005*(ctbevt-2151)) && zdcsum<=(120-.0142*(ctbevt-2151)))
26 NchCentrality centralityHMinus(
int nHMinus)
28 if(nHMinus>=212)
return kFive;
29 else if(nHMinus>=179)
return kTen;
30 else if(nHMinus>=127)
return kTwenty;
31 else if(nHMinus>=91)
return kThirty;
32 else if(nHMinus>=57)
return kForty;
33 else if(nHMinus>=35)
return kFifty;
34 else if(nHMinus>=20)
return kSixty;
35 else if(nHMinus>=10)
return kSeventy;
36 else if(nHMinus>=4)
return kEighty;
41 NchCentrality centralityNch(
int nCh)
43 if(nCh>=431)
return kFive;
44 else if(nCh>=364)
return kTen;
45 else if(nCh>=260)
return kTwenty;
46 else if(nCh>=179)
return kThirty;
47 else if(nCh>=118)
return kForty;
48 else if(nCh>=74)
return kFifty;
49 else if(nCh>=43)
return kSixty;
50 else if(nCh>=22)
return kSeventy;
51 else if(nCh>=10)
return kEighty;
56 NchCentrality centralityNchKludge(
int nCh)
58 if(nCh>431)
return kFive;
59 else if(nCh>364)
return kTen;
60 else if(nCh>260)
return kTwenty;
61 else if(nCh>179)
return kThirty;
62 else if(nCh>118)
return kForty;
63 else if(nCh>74)
return kFifty;
64 else if(nCh>43)
return kSixty;
65 else if(nCh>22)
return kSeventy;
66 else if(nCh>10)
return kEighty;