Skip to content

Commit

Permalink
include discrete junction tree for msvc and fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed May 24, 2022
1 parent b215d3a commit 453be44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gtsam/hybrid/HybridConditional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void HybridConditional::print(const std::string &s,
if (isDiscrete_) std::cout << "Disc. ";
if (isHybrid_) std::cout << "Hybr. ";
std::cout << "P(";
int index = 0;
size_t index = 0;
const size_t N = keys().size();
const size_t contN = N - discreteKeys_.size();
while (index < N) {
Expand Down
8 changes: 5 additions & 3 deletions gtsam/hybrid/HybridFactorGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <gtsam/discrete/Assignment.h>
#include <gtsam/discrete/DiscreteEliminationTree.h>
#include <gtsam/discrete/DiscreteFactorGraph.h>
#include <gtsam/discrete/DiscreteJunctionTree.h>
#include <gtsam/hybrid/GaussianMixtureConditional.h>
#include <gtsam/hybrid/GaussianMixtureFactor.h>
#include <gtsam/hybrid/HybridConditional.h>
Expand Down Expand Up @@ -104,9 +105,10 @@ EliminateHybrid(const HybridFactorGraph &factors, const Ordering &frontalKeys) {
// Because of all these reasons, we need to think very carefully about how to
// implement the hybrid factors so that we do not get poor performance.
//
// The first thing is how to represent the GaussianMixtureConditional. A very possible
// scenario is that the incoming factors will have different levels of
// discrete keys. For example, imagine we are going to eliminate the fragment:
// The first thing is how to represent the GaussianMixtureConditional. A very
// possible scenario is that the incoming factors will have different levels
// of discrete keys. For example, imagine we are going to eliminate the
// fragment:
// $\phi(x1,c1,c2)$, $\phi(x1,c2,c3)$, which is perfectly valid. Now we will
// need to know how to retrieve the corresponding continuous densities for the
// assi- -gnment (c1,c2,c3) (OR (c2,c3,c1)! note there is NO defined order!).
Expand Down

0 comments on commit 453be44

Please sign in to comment.