avk959 / LGenerics

Generic algorithms and data structures for Lazarus/Free Pascal
Apache License 2.0
113 stars 16 forks source link

FindMaxClique fail #9

Closed armenha closed 2 years ago

armenha commented 2 years ago

TintChart.FindMaxClique failes with message Acces Violation in file lgsimplegraph.pas line 1642

function TGSimpleGraph.FindChordalMaxClique(out aClique: TIntSet): Boolean; procedure NodeDone(aIndex: SizeInt; const aLefts: TIntSet); begin if aLefts.Count > Pred(aClique.Count) then begin aClique.Assign(aLefts); aClique.Push(aIndex); end; end; var Dummy: TIntArray; begin aClique.Clear; Result := FindPerfectElimOrd(@NodeDone, Dummy); if not Result then aClique.Clear; end;

avk959 commented 2 years ago

Thanks for the reporting. Could you provide a small example that demonstrates this?

armenha commented 2 years ago

Sorry! I build another program for test wich work correctly. I found my mistake.