function cycle = makeCycle(G, edge)
% part of eulerWalk: find a cycle in G that contains the edge
% eeeaesy. Just keep following neighbors until you get back around.
% http://www.unc.edu/~rowlett/Math148/notes/graphintro.html

cycle = edge;
% cut the initial edge out of graph so we don't do the obvious dumb thing
G = cutEdge(G, cycle(1), cycle(2));

while (cycle(end)~=cycle(1)),
	% find a neighbor of end
	newEdge = findEdge(G, cycle(end));
	nbr = newEdge(2);

	% cut the edge out of our working copy of the graph
	G = cutEdge(G, cycle(end), nbr);

	cycle(end+1) = nbr;
	% and repeat until we cycle.
end
