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 |
|
7 println(Runtime.getRuntime.maxMemory) |
6 |
8 |
7 type Pos = (Int, Int) |
9 type Pos = (Int, Int) |
8 type Path = List[Pos] |
10 type Path = List[Pos] |
9 |
11 |
10 def add_pair_urban(x: Pos)(y: Pos): Pos = |
12 def add_pair_urban(x: Pos)(y: Pos): Pos = |
25 case x::Nil => true |
27 case x::Nil => true |
26 case x::y::p => |
28 case x::y::p => |
27 if (legal_moves_urban(dim, p, y).contains(x)) correct_urban(dim)(y::p) else false |
29 if (legal_moves_urban(dim, p, y).contains(x)) correct_urban(dim)(y::p) else false |
28 } |
30 } |
29 |
31 |
|
32 // !!!!!!! the futures need to be removed |
30 //lazy val f1 = Future { |
33 //lazy val f1 = Future { |
31 |
34 |
32 val ts8 = CW7c.first_tour_heuristic(8, List((0,0))).get |
35 val ts8 = CW7c.first_tour_heuristic(8, List((0,0))).get |
33 assert(correct_urban(8)(ts8) == true) |
36 assert(correct_urban(8)(ts8) == true) |
34 |
37 |