import abc
import zfit
from ..util import ztyping as ztyping
from ..util.checks import Singleton as Singleton
from _typeshed import Incomplete
from zfit._interfaces import ZfitLoss as ZfitLoss

class ConvergenceCriterion(abc.ABC, metaclass=abc.ABCMeta):
    loss: Incomplete
    tol: Incomplete
    params: Incomplete
    name: Incomplete
    last_value: Incomplete
    def __init__(self, tol: float, loss: ZfitLoss, params: ztyping.ParamTypeInput, name: str) -> None: ...
    def converged(self, result: zfit.core.fitresult.FitResult) -> bool: ...
    def calculate(self, result: zfit.core.fitresult.FitResult): ...

def calculate_edm(grad, inv_hesse): ...
def calculate_edm_hesse(grad, hessian): ...

class EDM(ConvergenceCriterion):
    def __init__(self, tol: float, loss: ZfitLoss, params: ztyping.ParamTypeInput, name: str | None = 'edm') -> None: ...

class CriterionNotAvailable(Singleton):
    def __bool__(self) -> bool: ...
    def __eq__(self, other): ...
    def __lt__(self, other): ...
    def __add__(self, other): ...
    def __mul__(self, other): ...
    def __pow__(self, power, modulo=None): ...
    def __hash__(self): ...

CRITERION_NOT_AVAILABLE: Incomplete
