Exemplo n.º 1
0
Arquivo: Flow.hpp Projeto: fev2g/SGL
	/*!  Computes the minimum cut of a network */
	void operator()(int source) 
	{ 
		bfs_select(source); 
		for(unsigned int i = 0; i < vertices.size(); i++)
			if(vertices[i])
			{
				typename Graph::iterator it(G, i);
				for(Flow *e = it.beg(); !it.end(); e = it.nxt())
					if(!vertices[e->other(i)] /*&& e->capRto(e->other(i)) == 0*/ && e->from(i))
						cut.push_back(e);
			}
	}