// JR
//	10/26/95 Written and compiled. Tested on a couple of cases.


Boolean Homeo::removeValenceOneVertices()
{
	theFingers.markInvalid();	// Finger update not yet coded.

//cout << "Entered removeValenceOneVertices()" << endl;
	Boolean didSomething=0;
	SetIterator<Vertex> iv(theGraph);
	for(iv.init();iv.ok();)
	{	
		if(iv.current().length()==1)
		{
cout << "  Removing valence-1 vertex " << iv.current() << "." << endl;
			collapseEdge(iv.current().ahead());
			didSomething=1;
			iv.init();
		}	
		else	iv.advance();
	}
	if(!didSomething)
	{
cout << "  There is no valence-1 vertex to remove." << endl;
	}
	return didSomething;
}
