Skip to content

Commit

Permalink
add test for SIS infinite time
Browse files Browse the repository at this point in the history
  • Loading branch information
stecrotti committed Dec 5, 2024
1 parent 2858717 commit f5690da
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/sis_small_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,20 @@
@test r_bp r_exact
@test c_bp c_exact
end

@testset "SIS small tree - stationary" begin
sis = SIS(g, λ, ρ, 0; γ, α)
bp = mpbp_stationary(sis)

iterate!(bp; tol=1e-14, maxiter=10)
local f(x,i) = x-1
m_bp = [only(m) for m in means(f, bp)]

bp_slow = MPBP(bp.g, [GenericFactor.(w) for w in bp.w], bp.ϕ, bp.ψ,
deepcopy(collect(bp.μ)), deepcopy(bp.b), collect(bp.f))
iterate!(bp_slow; tol=1e-14, maxiter=10, damp=0.5)
m_bp_slow = [only(m) for m in means(f, bp_slow)]
@test m_bp_slow m_bp
end

end

2 comments on commit f5690da

@stecrotti
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/120738

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.0 -m "<description of version>" f5690da116fc723dbceebc0deb073c56cf27b7da
git push origin v0.8.0

Please sign in to comment.