Skip to main content
. 2021 Mar 16;21(6):2069. doi: 10.3390/s21062069
Algorithm 1. Subgraph Extraction
  • 1:

    Input: bijA*;

  • 2:

    Output: (OTints,ITints), ints{a,b,c,}

  • 3:

    Idxrow = Idxcol = {1,2,,|A*|};

  • 4:

    i = 0;

  • 5:

    forints in {a,b,c,} do

  • 6:

    OTints=ITints=;

  • 7:

    if |Idxrow|1 then

  • 8:

       procedure Increment(i)

  • 9:

        i = i + 1;

  • 10:

        if iIdxrow then

  • 11:

        return i;

  • 12:

       else

  • 13:

        Increment(i);

  • 14:

      procedure Recursion(i)

  • 15:

       if jIdxcolbij1 then

  • 16:

        OTints=OTintsi;

  • 17:

        procedure Extract(i)

  • 18:

         for j in Idxcol do

  • 19:

           if bij0 then

  • 20:

            ITints=ITintsj;

  • 21:

          Idxcol = Idxcol\ITints;

  • 22:

          Idxrow = Idxrow\{i};

  • 23:

          for jITints do

  • 24:

           if lIdxrowblj1 then

  • 25:

            for l in Idxrow do

  • 26:

            if blj0 then

  • 27:

             OTints=OTintsl;

  • 28:

          if IdxrowOTints then

  • 29:

           Extract (l(IdxrowOTints));

  • 30:

          else

  • 31:

           return (OTints,ITints);

  • 32:

        else

  • 33:

         Idxrow = Idxrow\{i};

  • 34:

        i = i + 1;

  • 35:

         Recursion(i);

  • 36:

    else

  • 37:

      break;