aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2021-07-20 13:54:10 +0200
committerNiklas Halle <niklas@niklashalle.net>2021-07-20 13:54:10 +0200
commiteb92f7081cebefcc7eb678d6fe0d03eb228febe1 (patch)
tree889a540b66b51a7310fb27c964cef6da57e64b06
parent9ac1f9cd5b8e8637eef51402d730045aa7962b39 (diff)
downloadbachelor_thesis-eb92f7081cebefcc7eb678d6fe0d03eb228febe1.tar.gz
bachelor_thesis-eb92f7081cebefcc7eb678d6fe0d03eb228febe1.zip
explicit casting
-rwxr-xr-xcode/python/lfr_generate_graphs.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/code/python/lfr_generate_graphs.py b/code/python/lfr_generate_graphs.py
index 0e9fbdf..07eec7f 100755
--- a/code/python/lfr_generate_graphs.py
+++ b/code/python/lfr_generate_graphs.py
@@ -83,15 +83,15 @@ if __name__ == "__main__":
exe = sys.argv[0]
args = sys.argv[1:]
- graph_count = args[0] if len(args) >= 0 else DEF_graph_count
- node_count = args[1] if len(args) >= 1 else DEF_node_count
- mixing_coefficient = args[2] if len(args) >= 2 else DEF_mixing_coefficient
- avg_node_degree = args[3] if len(args) >= 3 else DEF_avg_node_degree
- max_node_degree = args[4] if len(args) >= 4 else DEF_max_node_degree
- degree_distribution_exponent = args[5] if len(args) >= 5 else DEF_degree_distribution_exponent
- min_community_size = args[6] if len(args) >= 6 else DEF_min_community_size
- max_community_size = args[7] if len(args) >= 7 else DEF_max_community_size
- community_distribution_exponent = args[8] if len(args) >= 8 else DEF_community_distribution_exponent
+ graph_count = int(args[0]) if len(args) >= 0 else DEF_graph_count
+ node_count = int(args[1]) if len(args) >= 1 else DEF_node_count
+ mixing_coefficient = float(args[2]) if len(args) >= 2 else DEF_mixing_coefficient
+ avg_node_degree = int(args[3]) if len(args) >= 3 else DEF_avg_node_degree
+ max_node_degree = int(args[4]) if len(args) >= 4 else DEF_max_node_degree
+ degree_distribution_exponent = float(args[5]) if len(args) >= 5 else DEF_degree_distribution_exponent
+ min_community_size = int(args[6]) if len(args) >= 6 else DEF_min_community_size
+ max_community_size = int(args[7]) if len(args) >= 7 else DEF_max_community_size
+ community_distribution_exponent = float(args[8]) if len(args) >= 8 else DEF_community_distribution_exponent
main(graph_count, node_count, mixing_coefficient, avg_node_degree, max_node_degree, degree_distribution_exponent,
min_community_size, max_community_size, community_distribution_exponent)