Skip to main content
. 2022 Mar 21;22(6):2418. doi: 10.3390/s22062418
Algorithm 1 Mimic transformation graph generation.
  • 1:

    functiongenerateMimicImageSet(LayerNum,layers[])

  • 2:

        for each i[1,LayerNum]do/Traverse mimic layer set/

  • 3:

              Insert layers[mi] information into Dockerfile

  • 4:

        Create image with Dockerfile and name it imageId

  • 5:

        Append imageId to images[]/Add image to the mimic image set/

  • 6:

        return images[]

  • 7:

    functioncreateMTG(images[],m)

  • 8:

        Wnull; /Weighted graph W/

  • 9:

        Select m different images from images[] as G

  • 10:

        while GW do

  • 11:

              Append G to W.Node[]

  • 12:

              for each node in W do

  • 13:

                    if diff(G, node) = 1 then

  • 14:

                         Append E(G,node) to W.Edge[]

  • 15:

        return W