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()
# Populate data structures if link not in times: times[link] = [] times[link].append((b, e)) if u not in nodes: nodes[u] = set() if v not in nodes: nodes[v] = set() nodes[u].add(v) nodes[v].add(u) assert (b <= e) assert ((old_b == None) or (b >= old_b)) if b == old_b: assert (e >= old_e) (old_b, old_e) = (b, e) nb_lines = nb_lines + 1 Cm._times = times Cm._nodes = nodes sys.stderr.write("Processed " + str(nb_lines) + " from stdin\n") # Start execution R = Cm.getMaximalCliques(omega) Cm.printCliques()