Content deleted Content added
m fixed CS1 errors: dates to meet MOS:DATEFORMAT (also General fixes) using AWB (10069) |
m →Method: WP:CHECKWIKI error fixes using AWB (10093) |
||
Line 6:
==Method==
Given ''M'' intervals of the form ''c''
The intersection algorithm begins by creating a table of tuples <offset,type>. For each interval there are three entries: the lower endpoint, the midpoint and the upper endpoint, labelled with types −1, 0 and +1 respectively. Thus the interval ''c''
Variables: This algorithm uses ''f'' as number of false tickers, ''endcount'' and ''midcount'' are integers. ''Lower'' and ''upper'' are values of offsets.
# <li value="0">[initialize best f] Start with ''f''=0, assuming all input intervals are valid. Each time no interval is found f will be incremented until either an interval is found or ''f''
# [initialize] ''endcount''=0 and ''midcount''=0.
# [find lower endpoint] Start at beginning of the list (lowest offset) consider each tuple in order. ''endcount'' = ''endcount''−''type''. If ''endcount''
# [tentative lower endpoint found, initialize to find upper endpoint] set ''endcount''=0.
# [determine number of midpoints] Start from end of list and work towards lower offsets. ''endcount'' = ''endcount''+''type''. If ''endcount''
# if ''lower''
#[increment number of falsetickers] ''f'' = ''f''+1. If ''f''
==References ==
|