Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jayant Khatkar
tempaware
Commits
5a665667
Commit
5a665667
authored
Oct 25, 2021
by
Jayant Khatkar
Browse files
multicontour neighbour search
parent
8a634396
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.jl
View file @
5a665667
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment