Research Article

A Clustering Approach for Multiband Neighbor Discovery on 60 GHz WLAN

Algorithm 1

Clustering greedy algorithm.

1: function CLUSTERING(C number of available channels, K number of nodes)
2: distance_matrix Matrix(K,K)
3: score Array(K)
4: leaders Array(C)
5: clusters Array(C)
6: limit
7: for each pair of nodes do
8: distance_matrix distance
9: end for
10: quickSort(distance_matrix)
11: for each node do
12: score sum of indices of the distance_matrix which contains
13: end for
14: leader C nodes with minimal score
15: for each cluster do
16: while (cluster[c]) < limit do
17: clusters[c] nearest node to the leader of not yet added to any cluster
18: endwhile
19: end for
20: if any node remains then
21: Add to the cluster of the nearest cluster leader, which
22: end if
23: return clusters
24: end function