Skip to main content
. 2019 Sep 17;21(9):905. doi: 10.3390/e21090905
Algorithm 1 DWS Algorithm (The Coding Module)
  • 1:

    Initialize γi=0, for i=1 to m

  • 2:

    fori=1 to m do

  • 3:

     for j=1 to |R(i)| do

  • 4:

      Initialize yj=0

  • 5:

      for k=1 to i−1 do

  • 6:

       yj←yj+αkwj(k)

  • 7:

      end for

  • 8:

     end for

  • 9:

     for j=1 to q do

  • 10:

      for k=1 to |R(i)| do

  • 11:

       if coefficient of pi in yk=αj then

  • 12:

        Continue loop for the next value of j at line 9

  • 13:

       end if

  • 14:

      end for

  • 15:

      γi=αj

  • 16:

      Continue loop for the next value of i at line 2

  • 17:

     end for

  • 18:

    end for

  • 19:

    Compute the linear combination, l=∑i=1mpiγi