Convert Adjacency matrix into edgelist
Table of Contents [Edge List <– Adjacency Matrix](# Edge List <– Adjacency Matrix) [Edge List –> Adjacency Matrix](# Edge List –> Adjacency Matrix) [About Adjacency List](#About Adjacency List) Edge List <– Adjacency Matrix ''' ref: https://www.cnblogs.com/sonictl/p/10688533.html convert adjMatrix into edgelist: 'data/unweighted_edgelist.number' or 'data/weighted_edgelist.number'' input: adjacency matrix with delimiter=', ' it can process: - Unweighted directed graph - Weighted directed graph output: edgelist (unweighted and weighted) ''' import numpy as np import networkx as nx # -------DIRECTED Graph, Unweighted----------- # Unweighted directed graph: a = np.
…