direct: delete experimental stuff
This commit is contained in:
parent
ba2d937933
commit
adc54d20d7
1 changed files with 1 additions and 11 deletions
|
@ -66,11 +66,6 @@ def birect(
|
|||
def no_more_evals():
|
||||
return max_evals is not None and n + 1 >= max_evals
|
||||
|
||||
avg = lambda a, b: (a + b) / 2 # TODO: delete me!
|
||||
diff = lambda a, b: -abs(a - b) / 2 # TODO: delete me!
|
||||
cycle_funs = [min, max, avg, diff] # TODO: delete me!
|
||||
cycle_funs = [min, avg, max, diff, max, avg] # TODO: delete me!
|
||||
cycle_funs = [min] # TODO: delete me!
|
||||
# interesting. using cycle_funs = [max] seems optimal for objective2210.
|
||||
|
||||
def gather_potential(v_i):
|
||||
|
@ -78,18 +73,13 @@ def birect(
|
|||
# x = diameter of hyper-rectangle
|
||||
# y = minimum loss of the two points (v_fl, v_fu) within it
|
||||
|
||||
cycle_fun = cycle_funs[outer % len(cycle_funs)] # TODO: delete me!
|
||||
|
||||
# TODO: make this faster. use a sorted queue and peek at the best for each depth.
|
||||
# start by finding the arg-minimum for each set of equal-diameter rects.
|
||||
bests = {} # mapping of depth to arg-minimum value (i.e. its index)
|
||||
for i in v_i:
|
||||
fl, fu = v_fl[i], v_fu[i]
|
||||
f = cycle_fun(fl, fu) # TODO: use min(fl, fu)!
|
||||
f = min(fl, fu)
|
||||
depth = v_depth[i]
|
||||
if cycle_fun == diff: # TODO: delete me!
|
||||
# f = f * (1 << depth) # TODO: delete me!
|
||||
f = f / diagonal_cache[depth] # TODO: delete me!
|
||||
if by_longest:
|
||||
depth = depth // dims * dims
|
||||
# assert depth < depth_limit
|
||||
|
|
Loading…
Reference in a new issue