Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@
*.exe
*.out
*.app

bin/uARMSolver
6 changes: 3 additions & 3 deletions sources/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void Setup::parse_sq_cauchy(vector<string>tokens)
if (tokens[0].compare("CAUCHY_PARAM") == 0) {
cout << "CAUCHY_PARAM started..." << endl;
} else if (tokens[0].compare("THRESHOLD") == 0) {
sq_param.sq.Thresh = stof(tokens[2]);
squ_param.sq.Thresh = stof(tokens[2]);
}
}

Expand All @@ -283,7 +283,7 @@ void Setup::parse_sq_euclid(vector<string>tokens)
if (tokens[0].compare("EUCLID_PARAM") == 0) {
cout << "EUCLID_PARAM started..." << endl;
} else if (tokens[0].compare("THRESHOLD") == 0) {
sq_param.sq.Thresh = stof(tokens[2]);
squ_param.sq.Thresh = stof(tokens[2]);
}
}

Expand Down Expand Up @@ -408,7 +408,7 @@ void Setup::print_sq_blk()
switch(squash) {
case SQUASH_CAUCHY:
cout << "Method= CAUCHY" << endl;
cout << "Threshold= " << sq_param.sq.Thresh << endl;
cout << "Threshold= " << squ_param.sq.Thresh << endl;
break;
case SQUASH_EUCLID:
cout << "Method= EUCLID" << endl;
Expand Down
6 changes: 3 additions & 3 deletions sources/Setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace std;
};

// squashing setups
struct sq_param {
struct squashing_param {
double Thresh;
};

Expand Down Expand Up @@ -130,8 +130,8 @@ class Setup {
} vis_param; ///< visualization parameters

union {
sq_param sq;
} sq_param; ///< squashing parameters
squashing_param sq;
} squ_param; ///< squashing parameters

};

Expand Down
2 changes: 1 addition & 1 deletion sources/Squash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int Squash::make_sq_dbase(Setup setup, Problem prob)
sim = sq_similarity(prob.dbase[pos], prob.dbase[i]);
else
sim = sq_distance(prob.dbase[pos], prob.dbase[i], prob.feat);
if(sim >= setup.sq_param.sq.Thresh) {
if(sim >= setup.squ_param.sq.Thresh) {
sq_set.push_back(prob.dbase[i]);
set_squashed(i);
k++;
Expand Down