Skip to main content
. 2024 Aug 9;10:e2215. doi: 10.7717/peerj-cs.2215
Algorithm 2: Split-Range 2
1: Input:b.list % the sequence number set of intervals
b[low/highlength(b.list), K − 1]    % boundary of intervals
2: fort←0:length(b.list) − 1 do
3: Find the independent intervals T from b[{lowhigh}, t, {0:K − 1}]
% independent intervals are not adjacent to each other
4: Count the number T.num and the size T.size of T.
5: g[T.num]
6: ground(KT.size/sum(T.size))
7: ifsum(g) ≠ K then
8: fori←0:T.num − 1 do
9: ifT.size[i] ≥ Sort(T.size)[KmodT.num] then
10: g[i]←K//T.num + 1
11: else
12: g[i]←K//T.num
13: end if
14: end for
15: end if
16: T.size[i] is divided into g[i]intervals.
Returning the bounds [bs.lowbs.high] of each interval
17: bd[lowb.list[t]]←bs.low
18: bd[highb.list[t]]←bs.high
19: end for
20: bp[b.list, 0:K − 1]←round((bd[high] − bd[low])/2)
21: Output:bp, bd