@@ -98,6 +98,7 @@ def test_elimination(self):
9898 self .assertFalse (bayesTree .empty ())
9999 self .assertEqual (12 , bayesTree .size ())
100100
101+ @unittest .skip ("TODO: segfaults on gcc 7 and gcc 9" )
101102 def test_discrete_bayes_tree_lookup (self ):
102103 """Check that we can have a multi-frontal lookup table."""
103104 # Make a small planning-like graph: 3 states, 2 actions
@@ -120,10 +121,23 @@ def test_discrete_bayes_tree_lookup(self):
120121 graph .add ([x1 , a1 , x2 ], table )
121122 graph .add ([x2 , a2 , x3 ], table )
122123
124+ # print(graph) will give:
125+ # size: 4
126+ # factor 0: f[ (x1,3), ] ...
127+ # factor 1: f[ (x3,3), ] ...
128+ # factor 2: f[ (x1,3), (a1,2), (x2,3), ] ...
129+ # factor 3: f[ (x2,3), (a2,2), (x3,3), ] ...
130+
123131 # Eliminate for MPE (maximum probable explanation).
124132 ordering = Ordering (keys = [A (2 ), X (3 ), X (1 ), A (1 ), X (2 )])
125133 lookup = graph .eliminateMultifrontal (ordering , gtsam .EliminateForMPE )
126134
135+ # print(lookup) will give:
136+ # DiscreteBayesTree
137+ # : cliques: 2, variables: 5
138+ # - g( x1 a1 x2 ): ...
139+ # | - g( a2 x3 ; x2 ): ...
140+
127141 # Check that the lookup table is correct
128142 assert lookup .size () == 2
129143 lookup_x1_a1_x2 = lookup [X (1 )].conditional ()
0 commit comments