Skip to main content
. 2021 May 20;23(5):638. doi: 10.3390/e23050638
Algorithm 1 Matrix scaling and consensus (collective)
  • 1:

    init x(0)

  • 2:

    L=DAoutA

  • 3:

    Δ(0)=DL1

  • 4:

    P¯=(IΔ(0)L)

  • 5:

    P(0)=P¯Δ(0)+[IΔ(0)]

  • 6:

    π(0)=0,η(0)=1

  • 7:

    repeat

  • 8:

    π(t+1)=P(0)π(t)

  • 9:

    η(t+1)=maxπ(t),maxη(t)A

  • 10:

    Δ(t+1)=Δ(0)π(t+1)η(t+1)

  • 11:

      P(t+1)=P¯Δ(t+1)+[IΔ(t+1)]

  • 12:

      x(t+1)=P(t+1)x(t)

  • 13:

    untilx(t) converges