Skip to main content
. 2018 Oct 11;18(10):3410. doi: 10.3390/s18103410
Algorithm 1. Partition of Group Nodes
Input: the numbers of the whole nodes m, L, the nodes’ position Ln, CA
Output: new nodes’ position after group nodes classification Ln’, group nodes G
1: last_id = −1
2: for i = 1:m
3:   id = ceil(Ln(i)/CA)
4:   add Ln(i) into G(id)
5:   if id ! = last_id
6:    add Ln(i) into Ln
7:    last_id = id
8:   end if
9: end
10: return Ln’, G