Skip to main content
. 2020 Jan 27;22(2):149. doi: 10.3390/e22020149
Algorithm 2 Function form_AG
Require:i, Si, Θ¯i+1(V), Γ¯i+1(V), Ψi1(V), Γi1(V), Πi1(V), Λi1(V)
  •  1:

    Define R1(n), R1(n), R2(n), R2(n), R1,2(n), R1,2(n), I(n), RS(n), RΛ(n) (depending on the case)

  •  2:

    if i=1 then A˜1[I(n)G1(n)G1,2(n)]S1

  •  3:

    if i[2,L1] then A˜i[I(n)]Si

  •  4:

    if i=L then A˜L[I(n)G2(n)]SL

  •  5:

    Ψ1,i1(V), Ψ2,i1(V)Ψi1(V) (depending on the case)

  •  6:

    Γ1,i1(V), Γ2,i1(V)Γi1(V) (depending on the case)

  •  7:

    Θ¯1,i+1(V), Θ¯2,i+1(V)Θ¯i+1(V) (depending on the case)

  •  8:

    Γ¯1,i+1(V), Γ¯2,i+1(V)Γ¯i+1(V) (depending on the case)

  •  9:

    A˜i[R1,2(n)]Γ1,i1(V)Γ¯1,i+1(V)

  • 10:

    A˜i[R1,2(n)]Ψ2,i1(V)Θ¯2,i+1(V)

  • 11:

    if i[1,L1] then

  • 12:

        A˜i[R1(n)]Θ¯1,i+1(V)

  • 13:

        A˜i[R1(n)]Γ¯2,i+1(V)

  • 14:

    end if

  • 15:

    if i[2,L] then

  • 16:

        A˜i[R2(n)]Ψ1,i1(V)

  • 17:

        A˜i[R2(n)]Γ2,i1(V)

  • 18:

        A˜i[RS(n)]Πi1(V)

  • 19:

        A˜i[RΛ(n)]Λi1(V)

  • 20:

    end if

  • 21:

    Πi(V)A˜i[I(n)G2(n)]

  • 22:

    Λi(V)A˜i[RΛ(n)]

  • 23:

    return the sequences A˜iG(n), Πi(V) and Λi(V)