jacint@1058: #include jacint@1058: #include jacint@1058: #include jacint@1058: #include jacint@1058: jacint@1058: #include jacint@1058: #include klao@1060: #include jacint@1058: #include jacint@1058: jacint@1058: using namespace lemon; klao@1060: using namespace std; jacint@1058: jacint@1058: klao@1060: int main() { klao@1060: klao@1060: typedef UndirSmartGraph Graph; jacint@1058: jacint@1058: typedef Graph::Edge Edge; jacint@1058: typedef Graph::UndirEdgeIt UndirEdgeIt; jacint@1058: typedef Graph::IncEdgeIt IncEdgeIt; jacint@1058: typedef Graph::NodeIt NodeIt; jacint@1058: typedef Graph::Node Node; klao@1060: klao@1060: typedef Graph::OutEdgeIt OutEdgeIt; jacint@1058: jacint@1058: Graph G; jacint@1058: klao@1060: // G.clear(); jacint@1058: std::vector nodes; jacint@1058: for (int i=0; i<5; ++i) jacint@1058: nodes.push_back(G.addNode()); jacint@1058: G.addEdge(nodes[0], nodes[0]); jacint@1058: G.addEdge(nodes[0], nodes[1]); jacint@1058: G.addEdge(nodes[0], nodes[2]); jacint@1058: G.addEdge(nodes[0], nodes[4]); jacint@1058: G.addEdge(nodes[2], nodes[3]); jacint@1058: G.addEdge(nodes[1], nodes[2]); jacint@1058: G.addEdge(nodes[2], nodes[4]); jacint@1058: jacint@1058: for(UndirEdgeIt e(G); e!=INVALID; ++e) { klao@1060: std::cout< max_matching(G); jacint@1058: max_matching.runEdmonds(0); jacint@1058: jacint@1058: return 0; jacint@1058: } jacint@1058: