/* ************************************************************************* */ TEST(GaussianFactorGraph, eliminate_empty) { // eliminate an empty factor GaussianFactorGraph gfg; gfg.add(JacobianFactor()); GaussianBayesNet::shared_ptr actualBN; GaussianFactorGraph::shared_ptr remainingGFG; boost::tie(actualBN, remainingGFG) = gfg.eliminatePartialSequential(Ordering()); // expected Bayes net is empty GaussianBayesNet expectedBN; // expected remaining graph should be the same as the original, still containing the empty factor GaussianFactorGraph expectedLF = gfg; // check if the result matches EXPECT(assert_equal(*actualBN, expectedBN)); EXPECT(assert_equal(*remainingGFG, expectedLF)); }