def pathsBench():
    t1 = timeMs()
    L = loadgraph("../graphs/threepaths1280.gr", graphclass=graph)
    fast_partitioning(L, [], [])
    # refine(L, [], [])
    timing = (timeMs() - t1)
    print("Time runned: " + str(timing) + "ms")
    writeDOT(L, "example.dot")
    return timing
def countAutomorphisms(findSingleIso=False, writeDot=False):
    L = loadgraph("../graphs/cographs1.grl", graphclass=graph, readlist=True)
    G = L[0][0]
    H = L[0][3]

    GH = disjointunion(G, H)
    t1 = timeMs()
    numberofIso = countIsomorphism(GH, G, H, D, I, 1, findSingleIso)
    print("Number of Isomorphisms: " + str(numberofIso))
    timing = (timeMs() - t1)
    # print("Time runned: " + str(timing) + "ms")
    if writeDot:
        writeDOT(GH, "examplegraph.dot")
    return timing
def branching_rules(findSingleIso=False, writeDot=False):
    # L = loadgraph("../graphs/colorref_smallexample_4_7.grl", graphclass=graph, readlist=True)
    branching_rules = {0, 1, 2, 3}
    for rule in branching_rules:

        L = loadgraph("../graphs/products72.grl", graphclass=graph, readlist=True)
        G = L[0][4]
        H = L[0][7]
        GH = disjointunion(G, H)

        t1 = timeMs()

        numberofIso = countIsomorphism(GH, G, H, [], [], rule, findSingleIso)
        print("Number of Isomorphisms: " + str(numberofIso))
        print("Time runned: " + str((timeMs() - t1)) + "ms for branching rule: " + str(rule))
        if writeDot:
            writeDOT(GH, "examplegraph.dot")