rbyd-rr: Enabled color preservation on diverging-lower alt

It's a great sign that this just worked.

Now, the only case where coloring is not preserved is the
diverging-upper alt, and only when encountering a yellow node. A rather
complicated corner case:

          .->                    .->              .-> h=4 -.
    .-----b->                  .-b->            .-b->      |
    |     .->                  | .->            | .->      |
    | .---b->                .-y-b->          .-y-b->      |
    | |   .->                |   .->          |   .->      |
    | | .-b->                | .-b->          | .-b->      |
    | | | .->            y-r-b-b-b->        .-b-b-b->      |
  .-y-r-b-b-> rm me  =>  | |          =>    |              +- unbal :(
  |       .-> rm me      | |     .->        |              |
  |     .-b->            | |   .-b->      r-b---b-b->      |
  |     | .->            | |   | .->      |     | .->      |
  | .---b-b->            | '---b-b->      |     '-b->      |
  | |     .->            |       .->      |       .->      |
  | |   .-b->            |     .-b->      |     .-b->      |
  | |   | .->            |     | .->      |     | .->      |
  r-b---b-b->            '-----b-b->      '-----b-b-> h=3 -'
  ^                        ^
  diverging                diverging/stitching

In theory it _is_ possible to preserve coloring on yellow nodes, but
right now this only seems possible by duplicating most of the
yellow-split logic, which doesn't seem worth it...
This commit is contained in:
Christopher Haster
2024-04-05 17:07:36 -05:00
parent f957dad821
commit 9c8a44a461
+1 -1
View File
@@ -3289,7 +3289,7 @@ again:;
goto push;
} else {
alt &= ~LFSR_TAG_R;
//alt &= ~LFSR_TAG_R;
//d_will_diverge = true;
diverged = true;
}