equal
deleted
inserted
replaced
|
1 import M4a._ |
|
2 //type Pos = (Int, Int) // a position on a chessboard |
|
3 //type Path = List[Pos] // a path...a list of positions |
|
4 |
|
5 /* |
|
6 def count_all_tours_urban(dim: Int) = { |
|
7 for (i <- (0 until dim).toList; |
|
8 j <- (0 until dim).toList) yield count_tours(dim, List((i, j))) |
|
9 } |
|
10 */ |
|
11 |
|
12 def count_all_tours_urban(dim: Int) = { |
|
13 for (i <- (0 until 3).toList; |
|
14 j <- (0 until dim).toList) yield count_tours(dim, List((i, j))) |
|
15 } |
|
16 |
|
17 |
|
18 assert(count_all_tours_urban(5) == List(304, 0, 56, 0, 304, 0, 56, 0, 56, 0, 56, 0, 64, 0, 56)) |
|
19 |