//This is just a simple example program to test my union-find structure //#include #include #include #include using namespace hugo; using namespace std; int main (int, char*[]) { typedef ListGraph::NodeIt NodeIt; typedef ListGraph::EachNodeIt EachNodeIt; typedef ListGraph::EdgeIt EdgeIt; ListGraph flowG; //Marci példája NodeIt s=flowG.addNode(); NodeIt v1=flowG.addNode(); NodeIt v2=flowG.addNode(); NodeIt v3=flowG.addNode(); NodeIt v4=flowG.addNode(); NodeIt t=flowG.addNode(); ListGraph::NodeMap component(flowG); component.set(s, -1); component.set(v1, -1); component.set(v2, -1); component.set(v3, -1); component.set(v4, -1); component.set(t, -1); UnionFind< NodeIt, ListGraph::NodeMap > uf(component); cout<<"Merge s and v1: "<(); i.valid(); ++i) { cout<<"Az "<