Skip to main content
. 2023 Dec 29;24(1):208. doi: 10.3390/s24010208
Algorithm 1. Edge-Aided Attribute-Based Cluster Algorithm
Input: input θ, UV, BS, EN
Output: CL=CL1,CL2,,CLl
  1: Calculate all DistENl,θj
  2: for l=1 to j do
  3:     if MEN =1, CPθjCPENl, min DistENl,θj
  4:     ENl become cluster head for CLl
  5:    updates the set of clusters CL
  6: end for
  7: Calculate all Distui,θj,Distvn,θj,DistbSn,θj
  8: for i=1 u, do
  9:     if min Distui,θj, Reuiθj<Bθj
 10:     ui joins the cluster CLl
 11:    end if
 12: end for
 13: for m=1, v=1 to n, do
 14:    if min Distvn,θj,CθjVA<Bθj
 15:     vn joins the cluster CLl
 16:    if min DistbSn,θj,CθjBS<Bθj
 17.     bSn joins the cluster CLl
 18:    end if
 19: end for
 20: Return all cluster CL=CL1,CL2,,CLl