Fix mistake with references

This commit is contained in:
Ricardo Montañana Gómez 2023-07-12 03:23:28 +02:00
parent 5793c31bc4
commit c5386d66fc
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ namespace bayesnet {
, classNumStates(classNumStates)
{
}
Metrics::Metrics(vector<vector<int>>& vsamples, vector<int>& labels, vector<string>& features, string& className, int classNumStates)
Metrics::Metrics(const vector<vector<int>>& vsamples, const vector<int>& labels, const vector<string>& features, const string& className, const int classNumStates)
: features(features)
, className(className)
, classNumStates(classNumStates)

View File

@ -8,8 +8,8 @@ namespace bayesnet {
class Metrics {
private:
torch::Tensor samples;
vector<string>& features;
string& className;
vector<string> features;
string className;
int classNumStates;
vector<pair<string, string>> doCombinations(const vector<string>&);
double entropy(torch::Tensor&);
@ -17,7 +17,7 @@ namespace bayesnet {
double mutualInformation(torch::Tensor&, torch::Tensor&);
public:
Metrics(torch::Tensor&, vector<string>&, string&, int);
Metrics(vector<vector<int>>&, vector<int>&, vector<string>&, string&, int);
Metrics(const vector<vector<int>>&, const vector<int>&, const vector<string>&, const string&, const int);
vector<float> conditionalEdgeWeights();
};
}