MultiField#
- class loop_detection.MultiField(rules, name=None, max_card=inf, field=None)[source]#
Class for multifield rule representation (n-tuples)
- Parameters:
rules (list) – list of rules for each field, can be Range or WildcardExpr instances
Examples
>>> r1 = MultiField([Range(10, 20), Range(1, 3)]) >>> r2 = MultiField([Range(5, 15), WildcardExpr("0**1")])
- __and__(other)[source]#
Returns the result of set intersection
- Parameters:
other (MultiField) –
- Return type:
Examples
>>> r1 = MultiField([Range(10, 20), Range(1, 3)]) >>> r2 = MultiField([Range(5, 15), Range(1, 1)]) >>> r1 & r2 [10, 15], [1, 1]
- __lt__(other)[source]#
Check if self is included in other (equality is accepted)
- Parameters:
other (MultiField) –
- Return type:
Examples
>>> r1 = MultiField([Range(10, 20), Range(1, 3)]) >>> r2 = MultiField([Range(13, 15), Range(1, 1)]) >>> r2 < r1 True