release/4.3a0
Varun Agrawal 2023-06-08 11:04:15 -04:00
parent be70ffcf01
commit c3090f00df
1 changed files with 0 additions and 20 deletions

View File

@ -524,8 +524,6 @@ TEST(DecisionTree, ApplyWithAssignment) {
DT prunedTree = tree.apply(pruner); DT prunedTree = tree.apply(pruner);
DT expectedTree(keys, "0 0 0 0 5 6 7 8"); DT expectedTree(keys, "0 0 0 0 5 6 7 8");
// expectedTree.print();
// prunedTree.print();
EXPECT(assert_equal(expectedTree, prunedTree)); EXPECT(assert_equal(expectedTree, prunedTree));
size_t count = 0; size_t count = 0;
@ -539,24 +537,6 @@ TEST(DecisionTree, ApplyWithAssignment) {
EXPECT_LONGS_EQUAL(5, count); EXPECT_LONGS_EQUAL(5, count);
} }
/* ************************************************************************** */
// Test number of assignments.
TEST(DecisionTree, Constructor) {
using gtsam::symbol_shorthand::M;
std::vector<double> probs = {0, 0, 1, 2};
DiscreteKeys keys{{M(1), 2}, {M(0), 2}};
DecisionTree<Key, double> dt1(keys, probs);
EXPECT_LONGS_EQUAL(4, dt1.nrAssignments());
dt1.print("", DefaultKeyFormatter, [](double x) { return std::to_string(x);});
DiscreteKeys keys2{{M(0), 2}, {M(1), 2}};
DecisionTree<Key, double> dt2(keys2, probs);
std::cout << "\n" << std::endl;
dt2.print("", DefaultKeyFormatter, [](double x) { return std::to_string(x);});
}
/* ************************************************************************** */ /* ************************************************************************** */
// Test number of assignments. // Test number of assignments.
TEST(DecisionTree, NrAssignments2) { TEST(DecisionTree, NrAssignments2) {