COIN-OR::LEMON - Graph Library

Changeset 2632:511cf2518a32 in lemon-0.x


Ignore:
Timestamp:
12/21/08 21:13:28 (10 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3517
Message:

Backport hg commit [81d40f1c850c] (ticket #197)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/unionfind.h

    r2631 r2632  
    11781178            if (nodes[nodes[jd].next].size < cmax) {
    11791179              pushLeft(nodes[jd].next, nodes[jd].left);
    1180               if (nodes[jd].item == nodes[pd].item) {
     1180              if (less(jd, nodes[jd].next) ||
     1181                  nodes[jd].item == nodes[pd].item) {
    11811182                nodes[nodes[jd].next].prio = nodes[jd].prio;
    11821183                nodes[nodes[jd].next].item = nodes[jd].item;
     
    12211222            if (nodes[nodes[jd].prev].size < cmax) {
    12221223              pushRight(nodes[jd].prev, nodes[jd].right);
    1223               if (nodes[jd].item == nodes[pd].item) {
     1224              if (less(jd, nodes[jd].prev) ||
     1225                  nodes[jd].item == nodes[pd].item) {
    12241226                nodes[nodes[jd].prev].prio = nodes[jd].prio;
    12251227                nodes[nodes[jd].prev].item = nodes[jd].item;
Note: See TracChangeset for help on using the changeset viewer.