From 0ff287ed38956c0a15f2a8ab503cb1b8253f706d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 2 Feb 2015 00:16:37 +0100 Subject: Select best try --- problem.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'problem.hpp') diff --git a/problem.hpp b/problem.hpp index 14ba475..4933ed6 100644 --- a/problem.hpp +++ b/problem.hpp @@ -91,10 +91,12 @@ struct solution { solution(const std::vector &m) : movement(m) {} // simple direct solution from A to B, takes into account no obstacles - static solution direct_sol(const hilare_a &pos_a, const hilare_a &pos_b); + static std::vector direct_sol(const hilare_a &pos_a, const hilare_a &pos_b); // check if a solution intersects an obstacle of problem bool intersects(const problem &p) const; + + double length(); }; struct solver_internal { @@ -106,6 +108,9 @@ struct solver_internal { void initialize(const problem &p); solution try_find_solution(); void step(const problem &p); + + // internal + void find_direct_path(int a, int b, const problem &p); }; class solver { -- cgit v1.2.3