Complete and fix KDB

This commit is contained in:
2023-07-13 16:59:06 +02:00
parent 3fcf1e40c9
commit e52fdc718f
7 changed files with 75 additions and 37 deletions

View File

@@ -245,5 +245,18 @@ namespace bayesnet {
}
return result;
}
vector<string> Network::show()
{
vector<string> result;
// Draw the network
for (auto node : nodes) {
string line = node.first + " -> ";
for (auto child : node.second->getChildren()) {
line += child->getName() + ", ";
}
result.push_back(line);
}
return result;
}
}