(G, sp, ep, func_id)
| 25 | RUBY = 2 |
| 26 | |
| 27 | def add_edge(G, sp, ep, func_id): |
| 28 | if ep in G[sp]: |
| 29 | G[sp][ep]['func_ids'].append(func_id) |
| 30 | else: |
| 31 | G.add_edge(sp, ep, func_ids=[func_id]) |
| 32 | |
| 33 | def intersected(a, b): |
| 34 | return a[0] <= b[0] <= a[1] or b[0] <= a[0] <= b[1] |