Skip to content

Commit

Permalink
Fix order of operations in hungarian conflict resolution conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
luxaritas authored Feb 28, 2025
1 parent 9e81453 commit d30a78d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arnie/pk_predictors.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _hungarian(bpp, exp=1, sigmoid_slope_factor=None, prob_to_0_threshold_prior=

if len(bps) == 1:
bp_list.extend(bps)
elif len(bps) > 2 and bps[0][0] in bps[-1] or bps[0][1] in bps[-1]:
elif len(bps) > 2 and (bps[0][0] in bps[-1] or bps[0][1] in bps[-1]):
# We have a cycle. We need to try both excluding the first element and excluding
# the last element (only one or the other, or neither, can be present since they conflict)
(bp_list_a,prob_a) = _max_weight_independent_set(bps[1:], bpp_orig)
Expand Down

0 comments on commit d30a78d

Please sign in to comment.