Einzelnen Beitrag anzeigen

Horst_

Registriert seit: 22. Jul 2004
Ort: Münster Osnabrück
116 Beiträge
 
#19

AW: Doppel schnell aus Lise löschen.

  Alt 8. Dez 2014, 10:49
Hallo,

Du sortierst doch zweidimensional.
Da musst Du doch zuerst x und nur bei gleichem x auf y testen

Statt
Delphi-Quellcode:
while (FItems[I].X <= Pivot.X) and (FItems[I].Y < Pivot.Y) do
        Inc(I);
Nun
Delphi-Quellcode:
while true do
  begin
  IF FItems[I].X < Pivot.X then
    inc(i)
  else
    IF (FItems[I].X = Pivot.X) AND (FItems[I].Y < Pivot.Y) then
      inc(i)
    else
      Break;
  end;
Gruß Horst
  Mit Zitat antworten Zitat