Source code for nachos.constraints.abstract_constraint

from typing import Union, Generator
from abc import ABC, abstractmethod


[docs]class AbstractConstraint(ABC):
[docs] @classmethod @abstractmethod def build(cls, conf: dict): raise NotImplementedError
[docs] def __init__(self): pass
[docs] @abstractmethod def __call__(self, c1: Union[list, Generator], c2: Union[list, Generator] ) -> float: raise NotImplementedError