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 vi∈Vdo

  • 5:

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

  • 6:

        lmax←lmin

  • 7:

        cs←{}

  • 8:

        for all ck∈K do

  • 9:

            lcon←{lvi,ck|(lvi,ck∈L)}

  • 10:

            if lcon≥lmax then

  • 11:

               lmax←lcon

  • 12:

               cs←ck

  • 13:

            end if

  • 14:

        end for

  • 15:

        if cs≠{} then

  • 16:

            Vcon←Vcon∪{<vi,cs,lmax>}

  • 17:

            csn←csn+1

  • 18:

        end if

  • 19:

    end for