changeset 193:e603a159704a

range_analysis: helper method, range_within
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 16 Dec 2009 16:54:07 +0100
parents 103d020aed2c
children 411188503c72
files pysmcl/range_analysis.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/range_analysis.py	Wed Dec 16 15:28:01 2009 +0100
+++ b/pysmcl/range_analysis.py	Wed Dec 16 16:54:07 2009 +0100
@@ -321,3 +321,8 @@
     if debug:
         print "  combined ranges:", r
     return r
+
+def interval_within(a, b):
+    """ Returns true if the interval of a is completely covered by
+    that of b. """
+    return a[0] >= b[0] and a[1] <= b[1]