示例#1
0
    v = contents[2].strip()

    link = frozenset([u, v])
    time = (t, t)

    # This a new instance
    Cm.addClique(Clique((link, time), set([])))

    # Populate data structures
    if link not in times:
        times[link] = []
    times[link].append(t)

    if u not in nodes:
        nodes[u] = set()

    if v not in nodes:
        nodes[v] = set()

    nodes[u].add(v)
    nodes[v].add(u)
    nb_lines = nb_lines + 1
Cm._times = times
Cm._nodes = nodes
sys.stderr.write("Processed " + str(nb_lines) + " from stdin\n")

# Restart execution
R = Cm.getDeltaCliques(delta)
sys.stdout.write("# delta = %d\n" % (delta))
Cm.printCliques()
示例#2
0
        nodes[u] = set()

    if v not in nodes:
        nodes[v] = set()

    nodes[u].add(v)
    nodes[v].add(u)


    
    assert( (old_t == None) or (t >= old_t) )

    old_t = t
    nb_lines = nb_lines + 1


#Debug: print all links in dataset
# for link in times:
#     for time in times[link]:
#         for v in link:
#             sys.stdout.write("%s "%v)
#         print(time[0], time[1])
    
Cm._times = times
Cm._nodes = nodes
sys.stderr.write("Processed " + str(nb_lines) + " from stdin\n")

## Start execution
R = Cm.getMaximalCliques(omega+delta/2)
Cm.printCliques()