Skip to main content
. 2018 Mar 1;18(3):747. doi: 10.3390/s18030747
Algorithm 2 The K-Spatial sampling (K-S) Algorithm.
Input: Number of nodes |N|, N1, N2, new sampling rate s1,s2
Output: The decision set D for the N nodes in time T
 1: for iN and tT do
 2:  if iN1 then
 3:   D(i,t)=Rand()<s1 // the dense-deployed case.
 4:  else if iN2 then
 5:   D(i,t)=Rand()<s2 // the sparse-deployed case.
 6:  end if
 7: end for
 8: return D