Skip to main content
. 2022 Mar 21;22(6):2418. doi: 10.3390/s22062418
Algorithm 2 Generate the mimic transformation sequence.
  • Require: 

    The Mimic Transformation Graph MTG(N,E)

  • Ensure: 

    The Mimic Transformation Sequence S

  • 1:

    Create an empty Transformation Hops Matrix M;

  • 2:

    fori in N do

  • 3:

          for j in N do

  • 4:

                nij The number of hops for the shortest path from ni to nj

  • 5:

                nij appends to M.Node[];

  • 6:

    fortm; t  >  0; tt1 do

  • 7:

          for each element in M do

  • 8:

                if element  <  t then

  • 9:

                     element0;

  • 10:

                else

  • 11:

                     element1;

  • 12:

          if There exists a Hamiltonian path in M then

  • 13:

                return Hamiltonian path in sequence

  • 14:

    return Null