| 93 | } |
| 94 | |
| 95 | bool HasEdge(const string& src, int src_out, const string& dst, int dst_in) { |
| 96 | for (const Edge* e : g_->edges()) { |
| 97 | if (e->src()->name() == src && e->src_output() == src_out && |
| 98 | e->dst()->name() == dst && e->dst_input() == dst_in) |
| 99 | return true; |
| 100 | } |
| 101 | return false; |
| 102 | } |
| 103 | bool HasControlEdge(const string& src, const string& dst) { |
| 104 | return HasEdge(src, Graph::kControlSlot, dst, Graph::kControlSlot); |
| 105 | } |