From 876e2e822e58e18b8b206094434734c4257432b4 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Fri, 6 Jan 2023 22:50:50 -0800 Subject: [PATCH] Use template specialization --- gtsam/hybrid/HybridBayesTree.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/gtsam/hybrid/HybridBayesTree.h b/gtsam/hybrid/HybridBayesTree.h index 628a453a6..7240edaac 100644 --- a/gtsam/hybrid/HybridBayesTree.h +++ b/gtsam/hybrid/HybridBayesTree.h @@ -132,18 +132,15 @@ struct traits : public Testable {}; * This object stores parent keys in our base type factor so that * eliminating those parent keys will pull this subtree into the * elimination. - * This does special stuff for the hybrid case. * - * @tparam CLIQUE + * This is a template instantiation for hybrid Bayes tree cliques, storing both + * the regular keys *and* discrete keys in the HybridConditional. */ -template -class BayesTreeOrphanWrapper< - CLIQUE, typename std::enable_if< - boost::is_same::value> > - : public CLIQUE::ConditionalType { +template <> +class BayesTreeOrphanWrapper : public HybridConditional { public: - typedef CLIQUE CliqueType; - typedef typename CLIQUE::ConditionalType Base; + typedef HybridBayesTreeClique CliqueType; + typedef HybridConditional Base; boost::shared_ptr clique;