Comparator
This module describes the rules for comparing two Ordered objects.
class Ordered:
def __init__(comparator: Comparator)
class Comparator:
def compare(obj1: Ordered, obj2: Ordered) -> int
The compare method returns the comparison result for obj1 and obj2.
Note
This method is used for special method realisations __lt__, __le__, __eq__, __gt__, __ge__ in class Ordered.
MinValueMaxSize
This implementation compares two points. Point with the minimum value will be selected. If the values are equal, the point with the maximum number of variables will be selected.
from core.module.comparator import MinValueMaxSize
comparator = MinValueMaxSize()