Реферат: Графовые модели. Остов минимального веса
sr.Cells[t,t]:='-';
end; end;
edit1.Text:= inttostr(n);
end;
procedure TForm1.SpeedButton3Click(Sender: TObject);
var
o,min,imin,jmin:integer;
begin
SpeedButton3.Enabled:=false;
assignfile(f,extractfilepath(application.ExeName)+'\in.krs');
rewrite(f);
for i:= 1 to n do
for j:= 1 to n do
begin
if sg.cells[i,j]='-' then
wrt:=999
else
wrt:=strtoint(sg.cells[i,j]);
write(f,wrt);
end;
closefile(f);
assignfile(f,extractfilepath(application.exename)+'\in.krs');
reset(f);
for i:= 1 to n do
for j:= 1 to n do
begin
read(f,wrt);
if wrt=999 then
sg.cells[i,j]:='-'