JLou
JLou

Reputation: 41

How to count the number of mutual link between turtles in netlogo?

I have a network of turtles connected by links in Netlogo an I'm struggling to find a way to calculate the number of mutual links between turtles (ie if I randomly choose two turtles, how many of each of their links are connecting them to the same turtles?). Has anyone had luck with this?

Upvotes: 2

Views: 1175

Answers (1)

Alan
Alan

Reputation: 9620

With undirected links:

count ([link-neighbors] of turtle 0) with [member? turtle 1 link-neighbors]

Upvotes: 3

Related Questions