Research Article

Intrusion Detection in Wireless Sensor Networks with an Improved NSA Based on Space Division

Table 5

Space division iteration process.

DivideSpace(sub, i)
Input: subspace to be divided
Input: dimension to be divided
 Step 1. Determine whether the subspace does not contain any self or has a minimum diameter. If it is, the subspace is added to the SubSpaces and return. Otherwise, perform step 2.
 Step 2. The dimension of the subspace is divided, and two subspaces are obtained. Compute the contained selves and half-contained selves in the subspaces.
 Step 3. . if , .
 Step 4. For every subspace, call DivideSpace(sub, i).