diff --git a/gtsam/discrete/tests/testDiscreteBayesNet.cpp b/gtsam/discrete/tests/testDiscreteBayesNet.cpp index ee7af73b9..f0c7d3728 100644 --- a/gtsam/discrete/tests/testDiscreteBayesNet.cpp +++ b/gtsam/discrete/tests/testDiscreteBayesNet.cpp @@ -163,7 +163,13 @@ TEST(DiscreteBayesNet, Dot) { fragment.add((Either | Tuberculosis, LungCancer) = "F T T T"); string actual = fragment.dot(); - EXPECT(actual == "digraph G{\n3->5\n6->5\n4->6\n0->3\n}"); + EXPECT(actual == + "digraph G{\n" + "0->3\n" + "4->6\n" + "3->5\n" + "6->5\n" + "}"); } /* ************************************************************************* */ diff --git a/gtsam/inference/BayesNet-inst.h b/gtsam/inference/BayesNet-inst.h index 4674b0083..be34b2928 100644 --- a/gtsam/inference/BayesNet-inst.h +++ b/gtsam/inference/BayesNet-inst.h @@ -39,8 +39,8 @@ void BayesNet::dot(std::ostream& os, const KeyFormatter& keyFormatter) const { os << "digraph G{\n"; - for (auto conditional : boost::adaptors::reverse(*this)) { - typename CONDITIONAL::Frontals frontals = conditional->frontals(); + for (auto conditional : *this) { + auto frontals = conditional->frontals(); const Key me = frontals.front(); auto parents = conditional->parents(); for (const Key& p : parents)