Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.17 KB

README.md

File metadata and controls

23 lines (18 loc) · 1.17 KB

Bow-tie detection

Bow-tie structure detection in directed networks

   Python License

A python implementation for the detection of a bow-tie structure in a directed network, following the definition as in: "Bow-tie Decomposition in Directed Graphs" - Yang et al. IEEE (2011)

Example - Running the code

The provided jupyter notebook contains a working example.

  1. Loading a directed network/graph, either as the corresponding adjacency matrix in numpy.array format or as a NetworkX.DiGraph
G = nx.DiGraph(nx.scale_free_graph(16, seed=14))
  1. Running the detection function
S, IN, OUT, TUBES, INTENDRILS, OUTTENDRILS, OTHER = get_bowtie_components(graph=G)