Skip to content

Commit

Permalink
add tests for random equal paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaspayette committed Jul 11, 2013
1 parent 3cd81cf commit 2d9ced3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ path-to-on-a-circle
O> crt 6 [ create-link-with turtle ((who + 1) mod 6) ]
sort [ length nw:path-to turtle 0 ] of turtles => [0 1 1 2 2 3]

path-to-random-equal-paths
extensions [ nw ]
O> cro 4 [ create-link-with turtle ((who + 1) mod 4) ]
length remove-duplicates n-values 100 [ [ nw:path-to turtle 2 ] of turtle 0 ] => 2

### turtles-on-path-to

turtles-on-path-to-self
Expand Down Expand Up @@ -261,6 +266,11 @@ turtles-on-path-to-on-a-circle
O> crt 6 [ create-link-with turtle ((who + 1) mod 6) ]
sort [length nw:turtles-on-path-to turtle 0 ] of turtles => [1 2 2 3 3 4]

turtles-on-path-to-random-equal-paths
extensions [ nw ]
O> cro 4 [ create-link-with turtle ((who + 1) mod 4) ]
length remove-duplicates n-values 100 [ [ nw:turtles-on-path-to turtle 2 ] of turtle 0 ] => 2

### mean-path-length

## undirected links
Expand Down Expand Up @@ -513,8 +523,18 @@ weighted-path-to-undirected-pair
(word [ nw:weighted-path-to turtle 1 "thickness" ] of turtle 0) => "[(link 0 1)]"
(word [ nw:weighted-path-to turtle 0 "thickness" ] of turtle 1) => "[(link 0 1)]"

weighted-path-to-random-equal-paths
extensions [ nw ]
O> cro 4 [ create-link-with turtle ((who + 1) mod 4) [ set thickness 1 ] ]
length remove-duplicates n-values 100 [ [ nw:weighted-path-to turtle 2 "thickness" ] of turtle 0 ] => 2

### turtles-on-weighted-path-to

turtles-on-weighted-path-to-random-equal-paths
extensions [ nw ]
O> cro 4 [ create-link-with turtle ((who + 1) mod 4) [ set thickness 1 ] ]
length remove-duplicates n-values 100 [ [ nw:turtles-on-weighted-path-to turtle 2 "thickness" ] of turtle 0 ] => 2

### mean-weighted-path-length

## generators
Expand Down

0 comments on commit 2d9ced3

Please sign in to comment.