Skip to main content
. 2020 Mar 14;22(3):336. doi: 10.3390/e22030336
Algorithm A1 Program Flow: Growth of the graph by attaching simplexes with defects
  • 1:

    INPUT:nmin, nmax, Nmax, p

  • 2:

    initialise graph G as a simplex of size n taken from the distribution pn=An2, which is defined in the range [nmin,nmax]

  • 3:

    initialise set of defected edges D as an empty set

  • 4:

    while N<Nmax do

  • 5:

       select new simplex size nnew[nmin,nmax] from the distribution pn

  • 6:

       randomly select the docking site as a simplex σG with folowing constraints: (1) order qσ<nnew1; (2) σ is not in set of defected edges D; and (3) σ does not contain any edge from D

  • 7:

       form a new simplex σnew by attaching nnewqσ1 new nodes to the qσ+1 nodes of the docking simplex σ

  • 8:

       if random number <p then

  • 9:

         if σ contains at least one of defected nodes (ends of defected edge) then

  • 10:

           Chose randomly a defected node a from σ and randomly b as one of nnewqσ1 new nodes

  • 11:

           Add edge (a,b) to D

  • 12:

         else

  • 13:

           Chose randomly one of newly added edges (a,b) and add to D

  • 14:

         end if

  • 15:

       end if

  • 16:

       sampling the data of interest;

  • 17:

    end while 

  • 18:

    END