Merge branch 'main' of ssh://gitea.rmontanana.es:8022/rmontanana/BayesNet
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
namespace bayesnet {
|
||||
Network::Network() : laplaceSmoothing(1), root(nullptr), features(vector<string>()), className("") {}
|
||||
Network::Network(int smoothing) : laplaceSmoothing(smoothing), root(nullptr), features(vector<string>()), className("") {}
|
||||
Network::Network(Network& other) : laplaceSmoothing(other.laplaceSmoothing), root(other.root), features(other.features), className(other.className)
|
||||
{
|
||||
for (auto& pair : other.nodes) {
|
||||
nodes[pair.first] = new Node(*pair.second);
|
||||
}
|
||||
}
|
||||
Network::~Network()
|
||||
{
|
||||
for (auto& pair : nodes) {
|
||||
|
@@ -20,6 +20,7 @@ namespace bayesnet {
|
||||
public:
|
||||
Network();
|
||||
Network(int);
|
||||
Network(Network&);
|
||||
~Network();
|
||||
void addNode(string, int);
|
||||
void addEdge(const string, const string);
|
||||
|
Reference in New Issue
Block a user