Skip to main content
. 2019 Jul 26;21(8):734. doi: 10.3390/e21080734
Algorithm 1 LCS cluster tree building algorithm.
  • Require :

    Sampling cluster A, CijϵA (i=1 to p and j=1 to x)

  • Ensure :

    The pre-attack steps array LS[][] of each attack ai

  •   1:

    for (i=1; i<p; i++) do

  •   2:

    k=0;

  •   3:

    for (m=2; m<=x; m++) do

  •   4:

      for (n=1; n<=m; n++) do

  •   5:

       s = LCS(Cim,Cin);

  •   6:

       if (s!= null) then

  •   7:

    LS[i][k++]=s;

  •   8:

    Build_Tree(s);

  •   9:

      end if

  •  10:

      end for

  •  11:

     end for

  •  12:

    end for