PMC full text:
Algorithm 4: RemoveComplexBulges
1: procedure RemoveComplexBulges |
2: globalG |
3: for all |
4: B ← {s} |
5: whileB ⊂ D(s) do |
6: Let v be the closest vertex to s that is in D(s) but not in B |
7: B = Closure(s, B ∪ {v}) |
8: if height of B is larger than 250 orB contains more than 500 vertices then |
9: break |
10: end if |
11: ifG[B] is not a tree then ▹ Condition D1 |
12: (S, g) ← ConstructSkeleton(B) |
13: ifS is a tree then ▹ Necessary condition for B to have a proper skeleton |
14: j ← ConstructProperSkeleton(s, G[B], S, g) |
15: if the ConstructProperSkeleton procedure succeeded then ▹ Condition D2 |
16: Replace G[B] with a tree j(S) ▹ Project bulge onto a proper skeleton |
17: break |
18: end if |
19: end if |
20: end if |
21: end while |
22: end for |
23: end procedure |