Skip to main content
. 2022 Nov 23;22(23):9105. doi: 10.3390/s22239105
Algorithm 1 Bottom–Up Approach (BU)
  • 1:

    Input: V, C, L, lmin, nmax

  • 2:

    Output:Vcon

  • 3:

    Vcon{}

  • 4:

    for all viVdo

  • 5:

        K Select all cj{C|(cjn<nmax)(dist(vi,cj)cjr)}

  • 6:

        lmaxlmin

  • 7:

        cs{}

  • 8:

        for all ckK do

  • 9:

            lcon{lvi,ck|(lvi,ckL)}

  • 10:

            if lconlmax then

  • 11:

               lmaxlcon

  • 12:

               csck

  • 13:

            end if

  • 14:

        end for

  • 15:

        if cs{} then

  • 16:

            VconVcon{<vi,cs,lmax>}

  • 17:

            csncsn+1

  • 18:

        end if

  • 19:

    end for