Add getStates method
This commit is contained in:
parent
c4836bd5e3
commit
3750662f2c
@ -38,6 +38,14 @@ namespace bayesnet {
|
||||
{
|
||||
return classNumStates;
|
||||
}
|
||||
int Network::getStates()
|
||||
{
|
||||
int result = 0;
|
||||
for (auto node : nodes) {
|
||||
result += node.second->getNumStates();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
string Network::getClassName()
|
||||
{
|
||||
return className;
|
||||
|
@ -30,6 +30,7 @@ namespace bayesnet {
|
||||
void addEdge(const string, const string);
|
||||
map<string, Node*>& getNodes();
|
||||
vector<string> getFeatures();
|
||||
int getStates();
|
||||
int getClassNumStates();
|
||||
string getClassName();
|
||||
void fit(const vector<vector<int>>&, const vector<int>&, const vector<string>&, const string&);
|
||||
|
Loading…
Reference in New Issue
Block a user