diff -r 0b0bdf24d00c -r 81a3d0abe5f3 src/work/athos/uf_demo.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/athos/uf_demo.cc Fri Mar 26 14:59:18 2004 +0000 @@ -0,0 +1,48 @@ +//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 "<