add space after commas

release/4.3a0
Frank Dellaert 2022-01-30 14:02:10 -05:00
parent 3ba6566911
commit 88e3330d27
1 changed files with 8 additions and 8 deletions

View File

@ -95,7 +95,7 @@ namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
template <class CLIQUE> template <class CLIQUE>
void BayesTree<CLIQUE>::dot(std::ostream& s, sharedClique clique, void BayesTree<CLIQUE>::dot(std::ostream& s, sharedClique clique,
const KeyFormatter& indexFormatter, const KeyFormatter& keyFormatter,
int parentnum) const { int parentnum) const {
static int num = 0; static int num = 0;
bool first = true; bool first = true;
@ -104,10 +104,10 @@ namespace gtsam {
std::string parent = out.str(); std::string parent = out.str();
parent += "[label=\""; parent += "[label=\"";
for (Key index : clique->conditional_->frontals()) { for (Key key : clique->conditional_->frontals()) {
if (!first) parent += ","; if (!first) parent += ", ";
first = false; first = false;
parent += indexFormatter(index); parent += keyFormatter(key);
} }
if (clique->parent()) { if (clique->parent()) {
@ -116,10 +116,10 @@ namespace gtsam {
} }
first = true; first = true;
for (Key sep : clique->conditional_->parents()) { for (Key parentKey : clique->conditional_->parents()) {
if (!first) parent += ","; if (!first) parent += ", ";
first = false; first = false;
parent += indexFormatter(sep); parent += keyFormatter(parentKey);
} }
parent += "\"];\n"; parent += "\"];\n";
s << parent; s << parent;
@ -127,7 +127,7 @@ namespace gtsam {
for (sharedClique c : clique->children) { for (sharedClique c : clique->children) {
num++; num++;
dot(s, c, indexFormatter, parentnum); dot(s, c, keyFormatter, parentnum);
} }
} }