Skip to content

Commit c249ff1

Browse files
committed
measurement likelihood sampleFactor not consistent
1 parent 4f54e34 commit c249ff1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/testUseMsgLikelihoods.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ using IncrementalInference
99
fg = generateGraph_CaesarRing1D()
1010
getSolverParams(fg).useMsgLikelihoods = true
1111

12+
## test getSample
13+
14+
z = sampleFactor(fg[:x0x1f1])[1]
15+
16+
@test z isa Vector{<:Real}
17+
18+
##
19+
1220
initAll!(fg)
1321

1422
##
@@ -48,6 +56,14 @@ IIF.addMsgFactors!(cfg, beliefMsg4, IIF.UpwardPass)
4856
IIF.addMsgFactors!(cfg, beliefMsg5, IIF.UpwardPass)
4957
@test 2 === length(lsf(cfg))
5058

59+
##
60+
61+
z = sampleFactor(cfg, :x0x6f1)[1]
62+
63+
@test z isa Vector{<:Real}
64+
65+
##
66+
5167
childmsgs = LikelihoodMessage[]
5268
retdict = IIF.upGibbsCliqueDensity(cfg, tree[2], :default, childmsgs)
5369

0 commit comments

Comments
 (0)