Bug fix
authordeba
Mon, 17 Dec 2007 09:54:26 +0000
changeset 2542faaa54ec4520
parent 2541 e67ec65747fa
child 2543 a0443c411220
Bug fix
lemon/unionfind.h
     1.1 --- a/lemon/unionfind.h	Wed Dec 12 13:35:55 2007 +0000
     1.2 +++ b/lemon/unionfind.h	Mon Dec 17 09:54:26 2007 +0000
     1.3 @@ -692,6 +692,9 @@
     1.4        int cdx = newClass();
     1.5        classes[cdx].prev = -1;
     1.6        classes[cdx].next = firstClass;
     1.7 +      if (firstClass != -1) {
     1.8 +	classes[firstClass].prev = cdx;
     1.9 +      }
    1.10        firstClass = cdx;
    1.11        
    1.12        int idx = newItem();