Skip to content

Commit

Permalink
Undo TableFactor return in Hybrid GFG so we can group the changes tog…
Browse files Browse the repository at this point in the history
…ether
  • Loading branch information
varunagrawal committed Jul 13, 2023
1 parent 661d1fd commit bdbdc38
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions gtsam/hybrid/HybridGaussianFactorGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static GaussianFactorGraphTree addGaussian(
// TODO(dellaert): it's probably more efficient to first collect the discrete
// keys, and then loop over all assignments to populate a vector.
GaussianFactorGraphTree HybridGaussianFactorGraph::assembleGraphTree() const {
gttic(assembleGraphTree);
gttic_(assembleGraphTree);

GaussianFactorGraphTree result;

Expand Down Expand Up @@ -129,7 +129,7 @@ GaussianFactorGraphTree HybridGaussianFactorGraph::assembleGraphTree() const {
}
}

gttoc(assembleGraphTree);
gttoc_(assembleGraphTree);

return result;
}
Expand Down Expand Up @@ -263,12 +263,9 @@ hybridElimination(const HybridGaussianFactorGraph &factors,

DecisionTree<Key, double> probabilities(eliminationResults, probability);

auto dtf =
std::make_shared<DecisionTreeFactor>(discreteSeparator, probabilities);

return {
std::make_shared<HybridConditional>(gaussianMixture),
std::make_shared<TableFactor>(discreteSeparator, dtf->probabilities())};
std::make_shared<DecisionTreeFactor>(discreteSeparator, probabilities)};
} else {
// Otherwise, we create a resulting GaussianMixtureFactor on the separator,
// taking care to correct for conditional constant.
Expand Down

0 comments on commit bdbdc38

Please sign in to comment.