From 76b88bd06e8d9c3bce16b2277b7d6f6d7c02c3ea Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Tue, 9 Oct 2012 18:21:06 +0000 Subject: [PATCH] Added empty() to BayesNet --- gtsam/inference/BayesNet.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtsam/inference/BayesNet.h b/gtsam/inference/BayesNet.h index 05a1504cb..1077c1cad 100644 --- a/gtsam/inference/BayesNet.h +++ b/gtsam/inference/BayesNet.h @@ -105,6 +105,11 @@ public: return conditionals_.size(); } + /** @return true if there are no conditionals/nodes */ + bool empty() const { + return conditionals_.empty(); + } + /** print statistics */ void printStats(const std::string& s = "") const;