Skip to content

Commit

Permalink
fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Jan 18, 2025
1 parent dd34198 commit 8549665
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/OptimalBranchingMIS/test/greedymerge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ end
result_ip = OptimalBranchingCore.minimize_γ(tbl, clauses, Δρ, IPSolver(max_itr = 10, verbose = false))
@test OptimalBranchingCore.covered_by(tbl, result_ip.optimal_rule)

p = MISProblem(random_regular_graph(20, 3))
cls = OptimalBranchingCore.bit_clauses(tbl)
res = OptimalBranchingCore.greedymerge(cls, p, [1, 2, 3, 4, 5], D3Measure())
@test OptimalBranchingCore.covered_by(tbl, res.optimal_rule)
for i=1:100
Random.seed!(i)
p = MISProblem(random_regular_graph(20, 3))
cls = OptimalBranchingCore.bit_clauses(tbl)
res = OptimalBranchingCore.greedymerge(cls, p, Random.shuffle(1:20)[1:9], D3Measure())
@test OptimalBranchingCore.covered_by(tbl, res.optimal_rule)
end
end

0 comments on commit 8549665

Please sign in to comment.