From fa397a6eb18274b40f35d5966e35f0fc79a2f09c Mon Sep 17 00:00:00 2001 From: Benedict Date: Sat, 19 Mar 2016 15:15:33 +0100 Subject: added more frequent characters --- lib.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/lib.c b/lib.c index fc07022..c2ee753 100644 --- a/lib.c +++ b/lib.c @@ -309,9 +309,10 @@ static int frequent_histogramm_matchs(char *string, int length) int i; int hits = 0; char tmp; - int number_frequent_characters[10] = { 0, 0, 0, 0, 0, 0 ,0 ,0 ,0 ,0}; - // a e h i n o r s t u - double standard_frequencies[10] = { 8.1, 12.7, 6.0, 6.9, 6.7, 7.5, 5.9, 6.3, 9.0, 2.7 }; + int number_frequent_characters[14] = { 0, 0, 0, 0, 0, 0, 0, 0 ,0 ,0 ,0 ,0, 0, 0}; + // frequent characters: + // a c d e h i l m n o r s t u w + double standard_frequencies[14] = { 8.1, 2.7, 4.2, 12.7, 6.0, 6.9, 4.0, 2.4, 6.7, 7.5, 5.9, 6.3, 9.0, 2.7 }; // count frequent characters for(i=0;i freq))) { -- cgit v1.2.3-70-g09d2