]> thyrsus.com Git - comparator.git/commitdiff
More statistics polishing.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 16 Sep 2003 21:28:24 +0000 (21:28 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 16 Sep 2003 21:28:24 +0000 (21:28 +0000)
comparator.py
filterator

index d2ea2988ca15b721a6b9f6336a10e5d106e43194..d278ef81186b7a1563e7cbd71694141435bf5034 100644 (file)
@@ -207,6 +207,10 @@ class CommonReport:
                 filtered.append(clique)
         self.cliques = filtered
 
+    def statistics(self):
+        "Return a statistical summary object for the current report."
+        return CommonStatistics(self)
+
 class CommonStatistics:
     "Statistical information from a report."
     def __init__(self, report):
index 5316b0db86a6aa88d1bad24bb5c7f29ad514522e..cb50fcefb89eb7cffd3f6a5cea4b79d3c0836691 100755 (executable)
@@ -60,7 +60,7 @@ if __name__ == '__main__':
             state.filter_by_significance()
 
         if stats:
-            sys.stdout.write(str(comparator.CommonStatistics(state)))
+            sys.stdout.write(str(state.statistics()))
         else:
             report_common(state)
     except comparator.ComparatorException, e: