NetLogo / NW-Extension

This is the NetLogo Network Extension. For general information about NetLogo, see:
http://ccl.northwestern.edu/netlogo/
Other
62 stars 25 forks source link

Add "connected-to" primitive(s)? #86

Open nicolaspayette opened 11 years ago

nicolaspayette commented 11 years ago

Suggestion from @arthurhjorth.

You can use various path-to primitives to find out if a turtle is connected to another but it could be nicer (and possibly faster?) to be able to ask directly if it is connected.

nicolaspayette commented 11 years ago

More from @arthurhjorth :

  1. (observer) nw:weakly/strongly-connected? turtle1 turtle2, returns a boolean for whether they are connected in the current context. Currently we can use some of the network centrality measures and if it is false, they are not connected. But this will read better.
  2. Alternatively (or preferably additionally), the same primitive from the agent-perspective: (turtle) nw:weakly/strongly-connected-with? turtle1
SethTisue commented 11 years ago

I would expect the prims to be from an agent's perspective, for consistency with the rest of the language. I would not expect redundant, perspective-neutral primitives to also exist.

arthurhjorth commented 11 years ago

No, I talked with both Nicolas and Bryan, and they said the same thing. I am not entirely sure I like it per se, but I like it for consistency's sake

On Mon, Oct 14, 2013 at 6:12 PM, Seth Tisue notifications@github.comwrote:

I would expect the prims to be from an agent's perspective, for consistency with the rest of the language. I would not expect redundant, perspective-neutral primitives to also exist.

— Reply to this email directly or view it on GitHubhttps://github.com/NetLogo/NW-Extension/issues/86#issuecomment-26296646 .

Arthur Hjorth PhD Student, Learning Sciences Center for Connected Learning http://ccl.northwestern.edu/ Northwestern University

e: arthur.hjorth@u.northwestern.edu s: arthurhjorth m: +1 (773) 556-2805

nicolaspayette commented 11 years ago

(I pushed two commits with the wrong issue number, i.e., #86 instead of #91. I forced-pushed them out. I hope they will be garbage collected by GitHub but, if it is not the case, please disregarding the previous two commits.)