Intersection algorithm: Difference between revisions

Content deleted Content added
m More typographic improvements
CatherineMunro (talk | contribs)
m 'begining' -> 'beginning'; -- Join and fix more!
Line 15:
1) [initialize] ''endcount''=0 and ''midcount''=0.
 
2) [find lower endpoint] Start at beginingbeginning of the list (lowest offset) consider each tuple in order. ''endpoint'' = ''endpoint''−''type''. If ''endcount'' ≥ ''m''−''f'' then ''lower'' = ''offset'' and goto step 3 because the (possible) lower endpoint has been found. If the ''type'' = 0 then ''midcount'' = ''midcount''+1. Repeat with next tuple. If reach end of list then goto step 6.
 
3) [tentative lower endpoint found, initialize to find upper endpoint] set ''endcount''=0.