hello
i have an adjancy matrix for example
[0] 0,44, ( 0 : node / 0,44 it neighbors)
[1] 1,3,12,
[2] 2,33,40,
i need to remove all of the neighbors from a list and push them in another one
i wanna start from adj[specific number].begin to adj[specific number].end to remove the neighbors from the first list and push them in another one as i said
i tried this but it did not work
for(list<int>::iterator it = adj[argmax].begin(); it != adj[argmax].end(); it++)
{
if(color.at(*it) == 'w')
{
wlist.remove(*it);
color.at(*it) = 'g';
glist.push_back(*it);
}
}
help me please :)