Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- binding_value = 0.5*sum(structure);
- if(binding_value>=structure_size-1)
- linked = 1;
- else
- linked = 0;
- end
- sums = get_sums(structure, structure_size);
- for i = 1:structure_size
- if sums(i, 1) == sums(i, 2) & sums(i, 1) == 0 then
- linked = 0;
- break;
- end
- end
- if linked==1 then
- disp( 'Граф связный');
- else disp('Граф несвязный');
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement