Exemplo n.º 1
0
//Reverse all edge direction
void GRAPH::rev_edges()
{
	IS_TRUE(m_pool != NULL, ("not yet initialized."));
	IS_TRUE(m_is_direction, ("graph is indirection"));
	LIST<EDGE*> list;
	EDGE * e;
	INT c;
	for (e = get_first_edge(c); e != NULL; e = get_next_edge(c)) {
		list.append_tail(e);		
	}
	for (e = list.get_head(); e != NULL; e = list.get_next()) { 
		rev_edge(e);
	}	
}
void EdgeList::get_first_edge(int& v0, int& v1)
{
	int next_f, next_d;
	get_first_edge(v0, v1, next_f, next_d);
}