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