getConnectedLinks(C​,i0,j0)

Progressively add connected links to a target pair of nodes, one at a time.

19 Downloads

Updated 17 May 2017

View License

call:

[NS, ConLinkSeq, ConLinkInd, Tlinks, NZlinks, Clinks, Dlinks, Mlinks] = getConnectedLinks(C,i0,j0)

Given a weighted symmetric connectivity matrix (i.e. an undirected network) C, and two seed nodes,
i0 & j0, the function finds those links that are directly connected with at least one of the two
seed nodes and add them one at a time (from strongest to weakest). Once all direct links are added,
the function searches for those links that are directly connected with one of the existing nodes, and
adds them sequentially (from strongest to weakest). The function continues until the constructed network
converges to the original one (i.e. the matrix C), or until the last nodes added are completely
disconnected from the rest of the network, which thus implies that the final resulting network NS(:,:,end)
is an independent subnetwork of C


INPUT

C : Original Network (weighted, undirected)
i0 : i-th index of the seed node
j0 : j-th index of the seed node


OUTPUT

NS : Increasing Network Structures <N x N x K> , where K = Clinks (see below)
ConLinkSeq : Sequence of strengths of the K connected links
ConLinkInd : Linear indices of the K connected links
Tlinks : Total no. of possible links in the Network
NZlinks : Total Num. of nonzero-links
Clinks : Total Num. of links directly and indirectly connected to the seed nodes
Dlinks : Total Num. of links directly connected to the seed nodes
Mlinks : Last link of each mask

Cite As

Ruggero G. Bettinardi (2023). getConnectedLinks(C,i0,j0) (https://www.mathworks.com/matlabcentral/fileexchange/62995-getconnectedlinks-c-i0-j0), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

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