From 98aa3b06273ecd87074c881face60c765c3643fb Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 1 Aug 2012 21:07:50 +0000 Subject: [PATCH] In BayesTree, return a const reference to the 'nodes' structure, instead of a copy --- gtsam/inference/BayesTree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/inference/BayesTree.h b/gtsam/inference/BayesTree.h index 7391e9a10..34e5c0c45 100644 --- a/gtsam/inference/BayesTree.h +++ b/gtsam/inference/BayesTree.h @@ -202,7 +202,7 @@ namespace gtsam { } /** return nodes */ - Nodes nodes() const { return nodes_; } + const Nodes& nodes() const { return nodes_; } /** return root clique */ const sharedClique& root() const { return root_; }