Find Network Components

버전 1.2.0.0 (4.14 KB) 작성자: Daniel Larremore
Find network components, sizes, and lists of member nodes.
다운로드 수: 2.7K
업데이트 날짜: 2014/4/24

라이선스 보기

Given an undirected network represented by an adjacency matrix, we may wish to find that network's
- largest component
- number of components
- list of which nodes are in which component together.
This code computes these rapidly (linear in the number of nodes) and accurately. The code is commented so that if you wish to modify it, you may do so.

INPUT:
1. Network adjacency matrix.

OUTPUTS:
1. Number of network components
2. Sizes of network components (sorted, descending)
3. Membership list of each component (sorted by component size, descending).

Code includes a couple examples of usage at the top. I have tested this in R2014a, but it uses nothing fancy, and I believe it to be backward compatible for many years.

인용 양식

Daniel Larremore (2024). Find Network Components (https://www.mathworks.com/matlabcentral/fileexchange/42040-find-network-components), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

networkComponents/

버전 게시됨 릴리스 정보
1.2.0.0

Fixed typos (clarity), removed possibility of self-edges in the example (clarity), changed instances of "cluster" to "component" in comments and variable names (clarity and correctness), and sorted outputs by component sizes (ease of use).

1.1.0.0

Fixed typo in description.

1.0.0.0