Altius / hotspot2

Implementation of hotspot2 by Eric Rynes
16 stars 3 forks source link

hotspot2.cpp: If k < k_c lowers MAxN to 0, or k_c bin gets deleted, call findCutoff() #15

Closed erynes closed 8 years ago

erynes commented 8 years ago

If no "trend reversal" is detected in the moving average of the histogram bin heights, then the first occurrence of moving average = 0 gets called the cutoff (m_kcutoff, a.k.a. k_c), otherwise all data gets used and nothing gets cut off. When a site with k1 < k_c exits the sliding window to the left such that some k2 < k_c suddenly gets its moving average lowered to 0, findCutoff() needs to be called to ensure all appropriate variables get updated correctly. (Currently only a couple of them are, as a speed-greedy incorrect corner-cutting measure.)

Same thing when the bin corresponding to m_kcutoff happens to get deleted. (This happens when the histogram ends with a stretch of empty bins and 1 occurrence in the rightmost bin, and then the corresponding site exits the sliding window to the left.)

erynes commented 8 years ago

Closed via commit 1eadeba831d28108c29cb5dea860fbd1825f7a5b.