dimanche 19 mai 2019

how to generate a fully-connected directed random graph in networkx 2.1?

I need to generate a random fully-connected directed graph in networkx 2.1 to evaluate the performance of an algorithm of asymmetric traveling salesman problem. for example, generate a graph with 100 nodes, they are fully-connected, the edge weights are assigned randomly. the graph is directed (the edge weight from node i to node j is not necessarily equal to the edge weight from node j to node i)

I checked the "directed generators) part in the documentation of networkx 2.1 (https://networkx.github.io/documentation/networkx-2.1/reference/generators.html?highlight=generator#module-networkx.generators.directed), but these generators seem to not meet my requirement.




Aucun commentaire:

Enregistrer un commentaire