Skip to content

Commit

Permalink
add inflation and solveCliq! test
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Feb 17, 2021
1 parent 62af9fe commit 5b9e314
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion test/testEuclidDistance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,48 @@ pts .^= 2

##

end
end



@testset "test upward clique message range density behavior" begin

##

N=100
fg = initfg()
# getSolverParams(fg).inflation=250.0

addVariable!(fg, :x0, ContinuousEuclid{2}, N=N)
addFactor!(fg, [:x0], Prior(MvNormal([100.0;0], [1;1.0])), graphinit=false)

addVariable!(fg, :x1, ContinuousEuclid{2}, N=N)
addFactor!(fg, [:x1], Prior(MvNormal([0.0;100.0], [1;1.0])), graphinit=false)

addVariable!(fg, :l1, ContinuousEuclid{2}, N=N)
addFactor!(fg, [:x0;:l1], EuclidDistance(Normal(100.0, 1.0)), graphinit=false)
addFactor!(fg, [:x1;:l1], EuclidDistance(Normal(100.0, 1.0)), graphinit=false)

##

eo = [:x1; :x0; :l1]

tree = buildTreeReset!(fg, eo)

## what would clique solution produce as up message

# solveTree!(fg)

stuff = solveCliq!(fg, tree, :x1)


## still need to make sure numerical results are fine..., first must resolve #1168


##

end



#

0 comments on commit 5b9e314

Please sign in to comment.