Closed marlont2 closed 8 years ago
This is fantastic! Would you mind adding some tests? Happy to help you with them.
More than happy to write some tests. Just need to know the rules the project follows for consistency with other tests in extension.
I'd like to see one test for verifying that generating the ring lattice works for various neighborhood sizes. Something like:
watts-strogatz-no-rewire
extensions [ nw ]
O> nw:generate-watts-strogatz turtles links 20 1 0
remove-duplicates [ count link-neighbors ] of turtles => [2]
remove-duplicate [ nw:clustering-coefficient ] of turtles => [0]
O> clear-all
O> nw:generate-watts-strogatz turtles links 20 2 0
remove-duplicates [ count link-neighbors ] of turtles => [4]
remove-duplicate [ nw:clustering-coefficient ] of turtles => [0.25]
and so forth.
Testing with rewiring is trickier since it's inherently random. In general, generate the graph, and then check things you know should be right. For instance, the number of links should always be the neighborhood size times the number of turtles (actually, I think you might have a bug in your code related to this... write the test and find out!)
Any updates on this Marlon?
None. Swamped by other things. Can't revisit until December at the earliest.
On Fri, Oct 30, 2015 at 11:48 AM, Bryan Head notifications@github.com wrote:
Any updates on this Marlon?
— Reply to this email directly or view it on GitHub https://github.com/NetLogo/NW-Extension/pull/159#issuecomment-152583999.
No worries! Thanks for the update.
Hey, we were doing a bit of tidying up and closed this PR on accident when we deleted a branch. We would still really love to have this as part of the extension. If you get a chance to revisit this, please target a new PR against the 5.x branch. Thanks!
Ok, no problem. Thanks for the notification. Hoping to contribute soon!
On Thu, Jan 28, 2016 at 4:47 PM, Robert Grider notifications@github.com wrote:
Hey, we were doing a bit of tidying up and closed this PR on accident. We would still really love to have this as part of the extension. If you get a chance to revisit this, please target a new PR against the 5.x branch. Thanks!
— Reply to this email directly or view it on GitHub https://github.com/NetLogo/NW-Extension/pull/159#issuecomment-176464718.
I created and added an implementation of the Watts Strogatz algorithm in Scala and made the corresponding NetLogo primitive. This addition relates directly to Issue #70 in the NetLogo/NW-extension.