diff --git a/lib/xmet/series.py b/lib/xmet/series.py index d8c7e12..9ca3cec 100644 --- a/lib/xmet/series.py +++ b/lib/xmet/series.py @@ -17,6 +17,14 @@ class SeriesIntersection(enum.Enum): elif a < b: return SeriesIntersection.LESSER + def inverse(self): + if self is SeriesIntersection.GREATER: + return SeriesIntersection.LESSER + elif self is SeriesIntersection.LESSER: + return SeriesIntersection.GREATER + + return self + class Series(dict): def __init__(self): super().__init__()