From 6b792c0a4ca19b750a9c259c1dd84468786884ff Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 21 Aug 2022 12:56:59 -0400 Subject: [PATCH] add note about sumFrontals --- gtsam/hybrid/HybridGaussianFactorGraph.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gtsam/hybrid/HybridGaussianFactorGraph.cpp b/gtsam/hybrid/HybridGaussianFactorGraph.cpp index af381de04..b57d495d8 100644 --- a/gtsam/hybrid/HybridGaussianFactorGraph.cpp +++ b/gtsam/hybrid/HybridGaussianFactorGraph.cpp @@ -77,6 +77,19 @@ static GaussianMixtureFactor::Sum &addGaussian( } /* ************************************************************************ */ +/* Function to eliminate variables **under the following assumptions**: + * 1. When the ordering is fully continuous, and the graph only contains + * continuous and hybrid factors + * 2. When the ordering is fully discrete, and the graph only contains discrete + * factors + * + * Any usage outside of this is considered incorrect. + * + * \warning This function is not meant to be used with arbitrary hybrid factor + * graphs. For example, if there exists continuous parents, and one tries to + * eliminate a discrete variable (as specified in the ordering), the result will + * be INCORRECT and there will be NO error raised. + */ GaussianMixtureFactor::Sum sumFrontals( const HybridGaussianFactorGraph &factors) { // sum out frontals, this is the factor on the separator