formatting
parent
0cb1316753
commit
76568f2d73
|
@ -173,8 +173,7 @@ VectorValues HybridBayesTree::optimize(const DiscreteValues& assignment) const {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void HybridBayesTree::prune(const size_t maxNrLeaves) {
|
void HybridBayesTree::prune(const size_t maxNrLeaves) {
|
||||||
auto decisionTree =
|
auto decisionTree = this->roots_.at(0)->conditional()->asDiscrete();
|
||||||
this->roots_.at(0)->conditional()->asDiscrete();
|
|
||||||
|
|
||||||
DecisionTreeFactor prunedDecisionTree = decisionTree->prune(maxNrLeaves);
|
DecisionTreeFactor prunedDecisionTree = decisionTree->prune(maxNrLeaves);
|
||||||
decisionTree->root_ = prunedDecisionTree.root_;
|
decisionTree->root_ = prunedDecisionTree.root_;
|
||||||
|
|
|
@ -70,8 +70,7 @@ Ordering HybridGaussianISAM::GetOrdering(
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void HybridGaussianISAM::updateInternal(
|
void HybridGaussianISAM::updateInternal(
|
||||||
const HybridGaussianFactorGraph& newFactors,
|
const HybridGaussianFactorGraph& newFactors,
|
||||||
HybridBayesTree::Cliques* orphans,
|
HybridBayesTree::Cliques* orphans, const std::optional<size_t>& maxNrLeaves,
|
||||||
const std::optional<size_t>& maxNrLeaves,
|
|
||||||
const std::optional<Ordering>& ordering,
|
const std::optional<Ordering>& ordering,
|
||||||
const HybridBayesTree::Eliminate& function) {
|
const HybridBayesTree::Eliminate& function) {
|
||||||
// Remove the contaminated part of the Bayes tree
|
// Remove the contaminated part of the Bayes tree
|
||||||
|
@ -101,8 +100,8 @@ void HybridGaussianISAM::updateInternal(
|
||||||
}
|
}
|
||||||
|
|
||||||
// eliminate all factors (top, added, orphans) into a new Bayes tree
|
// eliminate all factors (top, added, orphans) into a new Bayes tree
|
||||||
HybridBayesTree::shared_ptr bayesTree =
|
HybridBayesTree::shared_ptr bayesTree = factors.eliminateMultifrontal(
|
||||||
factors.eliminateMultifrontal(elimination_ordering, function, std::cref(index));
|
elimination_ordering, function, std::cref(index));
|
||||||
|
|
||||||
if (maxNrLeaves) {
|
if (maxNrLeaves) {
|
||||||
bayesTree->prune(*maxNrLeaves);
|
bayesTree->prune(*maxNrLeaves);
|
||||||
|
|
Loading…
Reference in New Issue