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