diff --git a/gtsam/discrete/DecisionTreeFactor.cpp b/gtsam/discrete/DecisionTreeFactor.cpp
index e9c393c7d..3f40ddf3b 100644
--- a/gtsam/discrete/DecisionTreeFactor.cpp
+++ b/gtsam/discrete/DecisionTreeFactor.cpp
@@ -222,29 +222,13 @@ namespace gtsam {
/* ************************************************************************ */
string DecisionTreeFactor::html(const KeyFormatter& keyFormatter,
const Names& names) const {
- const string style =
- "\n";
-
stringstream ss;
// Print out preamble.
- ss << "
\n"
- << style
- << "
\n"
- " \n";
+ ss << "\n
\n \n";
// Print out header row.
- ss << " ";
+ ss << "
";
for (auto& key : keys()) {
ss << "" << keyFormatter(key) << " | ";
}
diff --git a/gtsam/discrete/tests/testDecisionTreeFactor.cpp b/gtsam/discrete/tests/testDecisionTreeFactor.cpp
index c9f692497..594134edf 100644
--- a/gtsam/discrete/tests/testDecisionTreeFactor.cpp
+++ b/gtsam/discrete/tests/testDecisionTreeFactor.cpp
@@ -161,21 +161,9 @@ TEST(DecisionTreeFactor, htmlWithValueFormatter) {
DecisionTreeFactor f(A & B, "1 2 3 4 5 6");
string expected =
"\n"
- "\n"
- "
\n"
+ "\n"
" \n"
- " A | B | value |
\n"
+ " A | B | value |
\n"
" \n"
" \n"
" Zero | - | 1 |
\n"
@@ -191,11 +179,6 @@ TEST(DecisionTreeFactor, htmlWithValueFormatter) {
DecisionTreeFactor::Names names{{12, {"Zero", "One", "Two"}},
{5, {"-", "+"}}};
string actual = f.html(keyFormatter, names);
- cout << expected << endl;
- cout << actual << endl;
- ofstream ef("expected=html.txt"), af("actual-html.txt");
- ef << expected << endl;
- af << actual << endl;
EXPECT(actual == expected);
}