示例#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();
}
示例#2
0
void Graph::addEdge(const Edge &e) {
    graph[e.Src()].insert(e);
}