Skip to content

desplenterkarel/bow-tie_detection

 
 

Repository files navigation

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)

About

Bow-tie structure detection in directed networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.9%
  • Python 3.1%