aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py')
-rw-r--r--Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py b/Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py
index 394168d8..a56caf45 100644
--- a/Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py
+++ b/Metrics/Metrics-Calculation/metrics_plot/utils/readCSV.py
@@ -33,6 +33,8 @@ def readcsvfile(filename):
33 #convert number to floats 33 #convert number to floats
34 numbers = [float(n) for n in numbers] 34 numbers = [float(n) for n in numbers]
35 contents[constants.Node_TYPE_KEY] = {t : n for t, n in zip(types, numbers)} 35 contents[constants.Node_TYPE_KEY] = {t : n for t, n in zip(types, numbers)}
36 elif(arr[0] == constants.TCC_VALUE):
37 contents[constants.TCC_VALUE] = list(map(float, arr[1:]))
36 # NA and OD are integers, and store other information as string 38 # NA and OD are integers, and store other information as string
37 else: 39 else:
38 try: 40 try:
@@ -79,6 +81,10 @@ def getmetrics(filename):
79 outdegree_sample = reproduceSample(contents[constants.OUT_DEGREE_VALUE], contents[constants.OUT_DEGREE_COUNT]) 81 outdegree_sample = reproduceSample(contents[constants.OUT_DEGREE_VALUE], contents[constants.OUT_DEGREE_COUNT])
80 na_sample = reproduceSample(contents[constants.NA_VALUE], contents[constants.NA_COUNT]) 82 na_sample = reproduceSample(contents[constants.NA_VALUE], contents[constants.NA_COUNT])
81 mpc_sample = reproduceSample(contents[constants.MPC_VALUE], contents[constants.MPC_COUNT]) 83 mpc_sample = reproduceSample(contents[constants.MPC_VALUE], contents[constants.MPC_COUNT])
84
85 if(constants.TCC_VALUE in contents):
86 contents[constants.TCC_VALUE] = reproduceSample(contents[constants.TCC_VALUE], contents[constants.TCC_COUNT])
87
82 return contents,outdegree_sample, na_sample, mpc_sample 88 return contents,outdegree_sample, na_sample, mpc_sample
83 89
84# 90#