Skip to content

Commit

Permalink
increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
stecrotti committed Dec 10, 2024
1 parent 2b19d78 commit cfa29f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/glauber_small_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ end
ising = Ising(J, h, β)
gl = Glauber(ising, 0)
bp = mpbp_stationary(gl)
@test is_periodic(bp)
svd_trunc = TruncVUMPS(12)

spin(x, i) = 3-2x; spin(x) = spin(x, 0)
iterate!(bp; tol=1e-14, maxiter=10, svd_trunc)
iterate!(bp; tol=1e-14, maxiter=10, svd_trunc, cb=CB_BPVUMPS(bp))
m_bp = [only(m) for m in means(spin, bp)]

pb, = pair_beliefs(bp)
Expand All @@ -345,6 +346,7 @@ end
iterate!(bp_slow; tol=1e-14, maxiter=10, svd_trunc)
m_bp_slow = [only(m) for m in means(spin, bp_slow)]
@test m_bp_slow m_bp
reset!(bp)
end

end

0 comments on commit cfa29f9

Please sign in to comment.