changeset 386 | e2170c91a9f2 |
385:44383203970f | 386:e2170c91a9f2 |
---|---|
1 import CW9a._ |
|
2 |
|
3 def count_all_tours_urban(dim: Int) = { |
|
4 for (i <- (0 until dim).toList; |
|
5 j <- (0 until dim).toList) yield count_tours(dim, List((i, j))) |
|
6 } |
|
7 |
|
8 |
|
9 assert(count_all_tours_urban(1) == List(1)) |
|
10 assert(count_all_tours_urban(2) == List(0, 0, 0, 0)) |
|
11 assert(count_all_tours_urban(3) == List(0, 0, 0, 0, 0, 0, 0, 0, 0)) |
|
12 assert(count_all_tours_urban(4) == List(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) |
|
13 |
|
14 |