Exemple #1
0
bool operator< (const Edge &lhs, const Edge &rhs) {
    if (lhs.Src() < rhs.Src()) return true;
    if (rhs.Src() < lhs.Src()) return false;
    return lhs.Dest() < rhs.Dest();
}
Exemple #2
0
void Graph::addEdge(const Edge &e) {
    graph[e.Src()].insert(e);
}