Intersection algorithm: Difference between revisions

Content deleted Content added
Tordek ar (talk | contribs)
Pifko (talk | contribs)
obvious correction
Line 15:
1) [initialize] ''endcount''=0 and ''midcount''=0.
 
2) [find lower endpoint] Start at beginning of the list (lowest offset) consider each tuple in order. ''endpointendcount'' = ''endpointendcount''−''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.