Esempio n. 1
0
def gen_scores(filename, r=20):
    fpath = "final_inputs/%s" % filename
    graph = make_weighted_graph(*validate_file(fpath))
    # random.seed(10)
    # find_sets(graph)
    scores = repeat_find_cover(graph, find_sets, r)
    outname = "output/%s_level.txt" % filename.split(".in")[0]
    save_scores(scores, outname)
Esempio n. 2
0
def main():
    # filename =  "generated1.in" # "sample3.in" # "generated3.in"
    # path = "data/%s" % filename
    # filename =  "02_01_00.in" #"3.in" #"0037.in"
    # path = "proposals/%s" % filename
    filename = "1.in"  #"3.in" #"0037.in"
    path = "final_inputs/%s" % filename
    # """
    edges, perfs = validate_file(path)
    graph = make_weighted_graph(edges, perfs)
    scores = repeat_find_cover(graph, find_sets, 20)