1: |
Input:b.list % the sequence number set of intervals |
|
b[low/high, length(b.list), K − 1] % boundary of intervals |
2: |
fort←0:length(b.list) − 1 do
|
3: |
Find the independent intervals T from b[{low, high}, 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: |
g←round(K⋅T.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.low, bs.high] of each interval |
17: |
bd[low, b.list[t]]←bs.low
|
18: |
bd[high, b.list[t]]←bs.high
|
19: |
end for
|
20: |
bp[b.list, 0:K − 1]←round((bd[high] − bd[low])/2) |
21: |
Output:bp, bd
|
|