Skip to content

Commit

Permalink
Algorithm fix
Browse files Browse the repository at this point in the history
  • Loading branch information
haxelion committed Nov 14, 2016
1 parent 1833b78 commit 743f73d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion focpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ vector<pair<T,string>> getTopFullKeys(vector<CorrFirstOrder<T>*> &candidates, si
for(size_t i = 0; i < candidates.size(); i++) {
if(limit[i] < n_keys) {
// Evaluate the correlation drop of the next candidate of this key byte
T drop = candidates[i][n_keys - limit[i]].corr - candidates[i][n_keys - limit[i] - 1].corr;
T drop = candidates[i][n_keys - 1].corr - candidates[i][n_keys - limit[i] - 1].corr;
if(drop < lowest_drop) {
lowest_drop = drop;
lowest_drop_idx = i;
Expand Down

0 comments on commit 743f73d

Please sign in to comment.