Content deleted Content added
→Algorithm: The old pseudo code had 3 bugs and was not working. The new one was implemented and very well tested by me and I am sure that it is correct. |
|||
Line 102:
if (P is not empty)
// Perform <math> M := M\oplus P </math>
for all (t,q):P▼
▲ // Make (t,q) match (first, third, ... edges)
▲ q.matching := t;
end for
end if
Line 121 ⟶ 113:
// Start at the last layer of BFS, and go backwards
// to layer 0.
// '''Return''': List of edges on augmenting path. Returns only edges from
// p: Is at the end of a non-matching edge (an odd layer)▼
// even to odd layers.
Get_Augmenting_Path(p):
if (p.visited OR p.layer = 0)
Line 128 ⟶ 122:
p.visited:= true;
// Consider only edges going one layer backwards.
for all (q,p):E s.t. (p.layer
// q is at an even layer
if (q.layer = 0)
// q is free vertex on the first layer
end if
// Note that q.matching must be defined, and point to
Line 138 ⟶ 133:
if (P not empty)
// Append (q, p) to the path found so far.
return (P, (q, p));
end if
end for
|