lemon/unionfind.h
changeset 2388 c6d537888fe5
parent 2332 587531b4fe0e
child 2391 14a343be7a5a
equal deleted inserted replaced
10:2d279b0f8afa 11:92000c9cd587
   406           }
   406           }
   407           if (items[k].nextClass != -1) {
   407           if (items[k].nextClass != -1) {
   408             items[items[k].nextClass].prevClass = nk;
   408             items[items[k].nextClass].prevClass = nk;
   409           }
   409           }
   410       
   410       
   411           int idx = items[k].nextItem;
   411           int l = items[k].nextItem;
   412           while (idx != k) {
   412           while (l != k) {
   413             items[idx].parent = nk;
   413             items[l].parent = nk;
   414             idx = items[idx].nextItem;
   414             l = items[l].nextItem;
   415           }
   415           }
   416           
   416           
   417           items[nk].parent = items[k].parent + 1;
   417           items[nk].parent = items[k].parent + 1;
   418         }
   418         }
   419       } else {
   419       } else {