equal
deleted
inserted
replaced
1 |
1 |
2 import scala.concurrent._ |
2 //import scala.concurrent._ |
3 import scala.concurrent.duration._ |
3 //import scala.concurrent.duration._ |
4 import ExecutionContext.Implicits.global |
4 //import ExecutionContext.Implicits.global |
5 import scala.language.postfixOps |
5 //import scala.language.postfixOps |
6 |
6 |
7 type Pos = (Int, Int) |
7 type Pos = (Int, Int) |
8 type Path = List[Pos] |
8 type Path = List[Pos] |
9 |
9 |
10 def add_pair_urban(x: Pos)(y: Pos): Pos = |
10 def add_pair_urban(x: Pos)(y: Pos): Pos = |
28 } |
28 } |
29 |
29 |
30 def correct_closed_urban(dim: Int)(p: Path) = |
30 def correct_closed_urban(dim: Int)(p: Path) = |
31 correct_urban(6)(p) && moves_urban(p.head).contains(p.last) |
31 correct_urban(6)(p) && moves_urban(p.head).contains(p.last) |
32 |
32 |
33 lazy val f = Future { |
33 //lazy val f = Future { |
34 |
34 |
35 val tsc = CW7c.first_closed_tour_heuristic(6, List((3, 3))).get |
35 val tsc = CW7c.first_closed_tour_heuristic(6, List((3, 3))).get |
36 assert(correct_closed_urban(6)(tsc) == true) |
36 assert(correct_closed_urban(6)(tsc) == true) |
37 |
37 |
38 } |
38 //} |
39 |
39 |
40 Await.result(f, 300 second) |
40 //Await.result(f, 300 second) |