From a3de1df5a48fce4e26ae03a0a6c47034be1b8cf9 Mon Sep 17 00:00:00 2001 From: Michael Kaess Date: Sun, 22 Nov 2009 21:18:31 +0000 Subject: [PATCH] adding orphans assuming that the first separator key refers to the parent; GTSAM_PRINT define --- cpp/Testable.h | 2 ++ cpp/testIncremental.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/cpp/Testable.h b/cpp/Testable.h index cf9ba148c..4b4e7db9a 100644 --- a/cpp/Testable.h +++ b/cpp/Testable.h @@ -11,6 +11,8 @@ #include #include +#define GTSAM_PRINT(x)(x.print(#x)) + namespace gtsam { /** diff --git a/cpp/testIncremental.cpp b/cpp/testIncremental.cpp index 208e8c2d6..288583c98 100644 --- a/cpp/testIncremental.cpp +++ b/cpp/testIncremental.cpp @@ -47,6 +47,12 @@ void update(SymbolicBayesTree& bayesTree, const boost::shared_ptrseparator_.begin()); // todo: assumes there is a separator... + SymbolicBayesTree::sharedClique parent = bayesTree[key]; + parent->children_ += orphan; + } + +#if 0 BOOST_FOREACH(string key1, orphan->separator_) { // get clique from new tree to attach to SymbolicBayesTree::sharedClique candidateParent = bayesTree[key1]; @@ -71,6 +77,7 @@ void update(SymbolicBayesTree& bayesTree, const boost::shared_ptr