changeset 463 | 0315d9983cd0 |
parent 424 | daf561a83ba6 |
462:34feeb53c0ba | 463:0315d9983cd0 |
---|---|
3 def count_all_tours_urban(dim: Int) = { |
3 def count_all_tours_urban(dim: Int) = { |
4 for (i <- (0 until dim).toList; |
4 for (i <- (0 until dim).toList; |
5 j <- (0 until dim).toList) yield count_tours(dim, List((i, j))) |
5 j <- (0 until dim).toList) yield count_tours(dim, List((i, j))) |
6 } |
6 } |
7 |
7 |
8 import scala.concurrent._ |
|
9 import scala.concurrent.duration._ |
|
10 import ExecutionContext.Implicits.global |
|
11 import scala.language.postfixOps |
|
12 |
|
13 lazy val f = Future { |
|
8 |
14 |
9 assert(count_all_tours_urban(1) == List(1)) |
15 assert(count_all_tours_urban(1) == List(1)) |
10 assert(count_all_tours_urban(2) == List(0, 0, 0, 0)) |
16 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)) |
17 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)) |
18 assert(count_all_tours_urban(4) == List(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) |
19 } |
|
13 |
20 |
21 Await.result(f, 32 second) |
|
14 |
22 |