@@ -229,7 +229,7 @@ v0 = addVariable!(fg, :x0, SpecialEuclidean2)
229229img_ = rand (10 ,10 ).+ 5.0
230230x_,y_ = ([- 9 : 2.0 : 9 ;],[- 9 : 2.0 : 9 ;])
231231
232- hmd = HeatmapDensityRegular (img_, (x_,y_), 5.5 , 0.1 )
232+ hmd = HeatmapDensityRegular (img_, (x_,y_), 5.5 , 0.1 , N = 1000 )
233233pthru = PartialPriorPassThrough (hmd, (1 ,2 ))
234234
235235# test without nullhyp
@@ -240,6 +240,7 @@ f0 = addFactor!(fg, [:x0], pthru, graphinit=false)
240240bel, infd = propagateBelief (fg, v0, [f0])
241241
242242@test isPartial (bel)
243+ @test length (getPoints (bel)) == 1000
243244
244245
245246# # repeat test with nullhypo
@@ -253,9 +254,46 @@ f0 = addFactor!(fg, [:x0], pthru, graphinit=false, nullhypo=0.2)
253254# # test the inference functions
254255
255256bel, infd = propagateBelief (fg, v0, [f0])
256-
257257@test isPartial (bel)
258258
259+ # #
260+
261+ doautoinit! (fg, :x0 )
262+
263+ @test length (getPoints (getBelief (fg, :x0 ))) == 1000
264+ @info " PassThrough transfers the full point count to the graph, unless a product is calculated during the propagateBelief step."
265+
266+ # #
267+
268+ solveGraph! (fg);
269+
270+ @test 1000 == length (getPoints (fg, :x0 ))
271+
272+ @warn " must still check if bandwidths are recalculated on many points (not necessary), or lifted from this case single prior"
273+
274+ # #
275+
276+ mp = ManifoldPrior (SpecialEuclidean (2 ), ProductRepr (@MVector ([0.0 ,0.0 ]), @MMatrix ([1.0 0.0 ; 0.0 1.0 ])), MvNormal ([0.01 , 0.01 , 0.01 ]))
277+ f1 = addFactor! (fg, [:x0 ], mp, graphinit= false )
278+
279+ @test length (ls (fg, :x0 )) == 2
280+
281+ # #
282+
283+ prp, infd = propagateBelief (fg, v0, [f0;f1])
284+
285+ @test length (getPoints (prp)) == getSolverParams (fg). N
286+
287+ # # check that solve corrects the point count on graph variable
288+
289+ @test 1000 == length (getPoints (fg, :x0 ))
290+
291+ solveGraph! (fg);
292+
293+ # this number should drop down to usual, 100 at time of writing
294+ @test getSolverParams (fg). N == length (getPoints (fg, :x0 ))
295+
296+
259297# #
260298end
261299
0 commit comments