procedure TGraf.pridajHranu(v1,v2:TVrchol; v:TVaha);
var i,j:integer;
begin
i:=0; while (i<=high(g)) and
(g[i]<>v1) do inc(i); j:=0;
while (j<=high(g)) and (g[j]<>v2) do inc(j);
if (i<=high(g)) and (j<=high(g))
then pridajHranu(i,j,v);
end;
procedure TGraf.zrusHranu(c1,c2:integer);
begin if (c1<=high(g)) and (c2<=high(g))
then
begin g[c1].zrusHranu(c2); g[c2].zrusHranu(c1);
// pre
neorientovane grafy end; end;