Page 211 - 《软件学报》2020年第11期
P. 211

3526                                Journal of Software  软件学报 Vol.31, No.11, November 2020

                    输出:查询结果集 R.
                    1. if VTs(Q)<PLs max  or VTe(Q)>PLe max  then
                    2.   R=∅; goto Step 44;
                    3. end if
                    4.    PLs mid =the midpoint of PLs, PLe mid =the midpoint of PLe; mid=Int((max+mid)/2);
                    5.    if VTs(Q)<PLs mid  and VTe(Q)>PLe mid  then
                    6.       if max<min then
                    7.           min=mid–1; goto Step 4;
                    8.       else goto Step 44;
                    9.       end if
                    10.   else if VTs(Q)≥PLs mid  and VTe(Q)≤PLe mid  then
                    11.      if max<min then
                    12.          max=mid+1; goto Step 4;
                    13.      else goto Step 44;
                    14.      end if
                    15.   else if VTs(Q)<PLs mid  and VTe(Q)≤PLe mid  then
                    16.      min=mid–1; goto Step 20;
                    17.   else if VTs(Q)≥PLs mid  and VTe(Q)>PLe mid  then
                    18.      min=mid–1; goto Step 32;
                    19.   end if
                    20. PLs mid =the midpoint of PLs;

                    21. if VTs(Q)<PLs mid  then
                    22.   if max<min then
                    23.      min=mid–1; goto Step 4;
                    24.   else goto Step 20;
                    25.   end if
                    26. else if VTs(Q)≥PLs mid  then
                    27.   if max<min then
                    28.      max=mid+1; goto Step 4;
                    29.   else goto Step 20;
                    30.   end if
                    31. end if
                    32. PLe mid =the midpoint of PLe;
                    33. if VTe(Q)>PLe mid  then
                    34.   if max<min then
                    35.      min=mid–1; goto Step 15;
                    36.   else goto Step 20;
                    37.   end if
                    38. else if VTe(Q)≤PLe mid  then
                    39.   if max<min then
                    40.      max=mid+1; goto Step 15;
                    41.   else goto Step 20;
   206   207   208   209   210   211   212   213   214   215   216