From 38c10667507a77693548cbbf5fd40b75a3cdc79b Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Tue, 23 Jul 2013 02:17:01 +0000 Subject: [PATCH] Readded BayesTree operator[] --- gtsam/inference/BayesTreeUnordered.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtsam/inference/BayesTreeUnordered.h b/gtsam/inference/BayesTreeUnordered.h index ec0087737..2f8db4f1c 100644 --- a/gtsam/inference/BayesTreeUnordered.h +++ b/gtsam/inference/BayesTreeUnordered.h @@ -134,6 +134,9 @@ namespace gtsam { /** return nodes */ const Nodes& nodes() const { return nodes_; } + /** Access node by variable */ + const Node::shared_ptr operator[](Key j) const { return nodes_.at(j); } + /** return root cliques */ const std::vector& roots() const { return roots_; }