Input: micro-cluster set micro_set from lower cells, similarity
         threshold
   Output: the macro-cluster set macro_set
1  repeat
2  foreach micro-cluster pair do
3      if Sim then
4    = merge ;
5         add to micro_set;
6          remove , from micro_set;
7      end
8     end
9   until no clusters can be merged in micro_set;
10  macro_set micro_set;
11 return macro_set;
Algorithm 3: Aggregation clustering.