Input: The number of result k,Group-Skyline R. |
Output: top-k Group-Skyline groups(S). |
1 Init array mark[] = {0}, C← |
2 for each group GiRdo |
3 ifGi has visited then |
4 continue; |
5 for each group GjRdo |
6 ifGj is not visited and Gi is equals to Gjthen |
7 add Gj to a existing chunk c |
8 else ifGj is not visited and j == ithen |
9 add Gi to a new chunk c. |
10 ifC == then. |
11 add chunk c to C |
12 else ifC!= then |
13 for each ci in Cdo |
14 ifci better than the head then |
15 insert ci into head, break |
16 else ifci worse than the last then |
17 insert ci into last, break |
18 else |
19 insert ci into the corresponding position, break |
20 S ← select k Group-Skyline groups from C 1. |
21 returnS1 |