Skip to main content
. 2017 Oct 10;17(10):2304. doi: 10.3390/s17102304
Algorithm 3 Approximation Algorithm for STP-MSPCL
Input: L, L0, rc
Output: A set C of Steiner points, CLL0
  • 1:

    for all li,ljL, ij do

  • 2:

    if distance(li,lj) rc then

  • 3:

      if liL0 and ljL0 then

  • 4:

       w(li,lj)=0;

  • 5:

      else

  • 6:

       w(li,lj)=1;

  • 7:

    for all li,ljL0, ij do

  • 8:

     Compute the shortest path P between li and lj;

  • 9:

    w(li,lj)=length(P);

  • 10:

    Compute a minimum spanning tree MST(L0) on L0;

  • 11:

    Let C be the set of locations lLL0 on the shortest path between any two locations in MST(L0);

  • 12:

    return C.