Commit 5a665667 authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

multicontour neighbour search

parent 8a634396
......@@ -570,7 +570,7 @@ function valid_swap(rollout::Vector{Int},
for c in c1s
c_dependents = outneighbors(cdata.G, c)
if any(c2s . c_dependents)
if any([c c_dependents for c in c2s])
return false
end
end
......@@ -805,7 +805,7 @@ function construct_best_neighbor(cdata::contourdata, cost_f::Function, k::Int=50
return eval(bn_func)
end
# TODO - COMPLETE THIS
function construct_best_neighbor_multi(cdata::contourdata,
cost_f::Function,
k::Int=10,
......@@ -819,7 +819,7 @@ function construct_best_neighbor_multi(cdata::contourdata,
if valid_swap(rl, (i, i + $multi_len), j, $cdata)
swap!(rl, (i, i + $multi_len), j)
costs[i,j] = $cost_f(rl)
swap!(rl, (i, i + $multi_len), jblah) # TODO THIS DOESNT SWAP BACK
swap!(rl, (i, j - $multi_len - 1), j)
end
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment