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.)
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.)