summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Muench <martin.muench@avira.com>2013-08-04 13:49:56 (GMT)
committer Martin Muench <martin.muench@avira.com>2013-08-04 13:49:56 (GMT)
commit32cb74c04e1d656432041403a15e7f9f64d8fec9 (patch)
tree8a9f58df84d7d74631714fe2f1e8d731536c70d5
parentb9e064c49901a0c1c997b7e3e9c779b398ec1219 (diff)
Calculate & show metric entropy as wellrefs/pull/2/head
-rw-r--r--code/tool/ropy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/code/tool/ropy.c b/code/tool/ropy.c
index 02999ae..f5350c9 100644
--- a/code/tool/ropy.c
+++ b/code/tool/ropy.c
@@ -135,9 +135,10 @@ main(int argc,
entropy_value = shannon_H(buffer, how_many_bytes_read);
fprintf(stdout,
- "tokens: %d entropy: %f maxent: %f ratio: %f\n",
+ "tokens: %d entropy: %f metric: %f maxent: %f ratio: %f\n",
get_num_tokens(),
entropy_value,
+ entropy_value/how_many_bytes_read,
get_max_entropy(),
get_entropy_ratio()
);