@@ -39,11 +39,13 @@ using Test
39
39
40
40
facts = map (n -> addFactor! (dfg, [verts[n], verts[n+ 1 ]], LinearConditional (Normal (50.0 ,2.0 ))), 1 : (numNodes- 1 ))
41
41
map (f -> setSolvable! (f, Int (round (rand ()))), facts)
42
- map (f -> f. solverData. multihypo = [1 , 0.1 , 0.9 ], facts)
43
42
map (f -> f. solverData. eliminated = rand () > 0.5 , facts)
44
43
map (f -> f. solverData. potentialused = rand () > 0.5 , facts)
45
44
updateFactor! .(dfg, facts)
46
45
46
+ # test multihypo
47
+ addFactor! (dfg, [:x1 , :x2 , :x3 ], LinearConditional (Normal (50.0 ,2.0 )), multihypo = [1 , 0.3 , 0.7 ])
48
+
47
49
# Save and load the graph to test.
48
50
saveDFG (filename, dfg)
49
51
@@ -61,11 +63,10 @@ using Test
61
63
for fact in lsf (dfg)
62
64
@test compareFactor (getFactor (dfg, fact),
63
65
getFactor (retDFG, fact),
64
- skip= [
65
- :hypotheses , :certainhypo , :multihypo , # Multihypo
66
- :eliminated ,
67
- :timezone , :zone , # Timezones
68
- :potentialused ])
66
+ skip= [:timezone , :zone ]) # Timezones
67
+ # :hypotheses, :certainhypo, :multihypo, # Multihypo
68
+ # :eliminated,
69
+ # :potentialused])
69
70
end
70
71
71
72
# Check data entries
94
95
@test issetequal (ls (retDFG), [:x1 , :x2 , :x3 , :x4 , :x5 ])
95
96
@test issetequal (lsf (retDFG), [:x3x4f1 , :x4x5f1 , :x1x2f1 , :x2x3f1 ])
96
97
end
97
- end
98
+ end
0 commit comments