Magda Bartczak
Magda Bartczak

Reputation: 1

Random Graph Generation but with weights

Hey so I'm doing a project where cities will be symbolized by vertices and streets with edges. I found this very cool erdos_renyi_graph function but I need some features that I couldn't find so far:

  1. every edge should have their (also random) weight
  2. I need to be sure that every vertice have at least 2 edges.

Can I do this with Erdős–Rényi Generator or maybe there is some other function I could use?

I was trying to use "er_np" function to adresse my 1st issue but I believe thats not really what I'm looking for. I was also checking fast_gnp_random_graph() and gnp_random_graph() function but those don't have weights parameters neither.

Upvotes: 0

Views: 165

Answers (0)

Related Questions