Worked on a similar problem (when looked at from a very high level), and the solution was to alternatively invoke each algorithm until everything is done. That is, do as much as possible in one form, then do as much in the other form, rinse and repeat.
2 comments
[ 2.6 ms ] story [ 12.5 ms ] threadhttps://ahefner.livejournal.com/20528.html