address review comments

release/4.3a0
Varun Agrawal 2022-03-18 08:19:01 -04:00
parent 13c60990f7
commit fa542a2038
2 changed files with 9 additions and 5 deletions

View File

@ -668,9 +668,11 @@ namespace gtsam {
for (size_t i = 0; i < choice->nrChoices(); i++) {
choices[choice->label()] = i; // Set assignment for label to i
VisitWith<L, Y> visit(f);
visit.choices = choices;
visit(choice->branches()[i]); // recurse!
(*this)(choice->branches()[i]); // recurse!
// Remove the choice so we are backtracking
auto choice_it = choices.find(choice->label());
choices.erase(choice_it);
}
}
};

View File

@ -20,11 +20,13 @@
// #define DT_DEBUG_MEMORY
// #define DT_NO_PRUNING
#define DISABLE_DOT
#include <CppUnitLite/TestHarness.h>
#include <gtsam/base/Testable.h>
#include <gtsam/discrete/DecisionTree-inl.h>
#include <gtsam/base/Testable.h>
#include <gtsam/discrete/Signature.h>
#include <CppUnitLite/TestHarness.h>
#include <boost/assign/std/vector.hpp>
using namespace boost::assign;