Skip to content

Commit

Permalink
fix skipped cpa computation on 'none' (byte cpa instead of bits cpa)
Browse files Browse the repository at this point in the history
  • Loading branch information
FdLSifu committed Aug 28, 2017
1 parent 89b4853 commit aa35ac3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion focpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ int first_order(Config & conf)
}
}

if ( (bit == bitsperbyte-1) || (bit == -1) ) {
if ( ((conf.bitnum == -1) && (bit == bitsperbyte-1)) // 'all' case
|| ((conf.bitnum != -1) && (bit >= 0)) // single bit case
|| (conf.bitnum == -2)) // 'none' case
{
int nbest=10; // TODO: make it a config parameter
sort (sum_bit_corels.back(), sum_bit_corels.back() + n_keys);
sort (peak_bit_corels.back(), peak_bit_corels.back() + n_keys);
Expand Down

0 comments on commit aa35ac3

Please sign in to comment.