Connected component (graph) using weighted quick union with path compression (wqupc)

Connected component (graph) using weighted quick union with path compression (wqupc)
36 Downloads
Updated 7 Jun 2016

View License

Input: G
G is an (n,n) undirected graph matrix, where n is the number of vertices
Output: labels
labels of the n vertices

Usage:
id = wqupc(G);
labels = id2labels(id);

Cite As

Changqing Wang (2024). Connected component (graph) using weighted quick union with path compression (wqupc) (https://www.mathworks.com/matlabcentral/fileexchange/57542-connected-component-graph-using-weighted-quick-union-with-path-compression-wqupc), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Graph and Network Algorithms in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0