find graph conected components
Versione 1.0.0.0 (4,95 KB) da
Maxim Vedenyov
[labels roots] = graph_connected_components(connection_matrix)
Breadth-first search used.
[labels rts] = graph_connected_components(C)
C - connection matrix
labels =[1 1 1 2 2 3 3 ...] lenght(labels)=L, label for each vertex
labels(i) is order number of connected component, i is vertex number
rts - roots, numbers of started vertex in each component, root is some vertex of connected component.
run
zz_test_graph_connected_components_picture.m to test the function, it will find triangle and square separated.
Cita come
Maxim Vedenyov (2026). find graph conected components (https://it.mathworks.com/matlabcentral/fileexchange/33877-find-graph-conected-components), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2010b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Scopri di più su Graph and Network Algorithms in Help Center e MATLAB Answers
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
