TerminationCriterion

class jaxrens.sampling.termination.TerminationCriterion(*args, **kwargs)[source]

Bases: Protocol

Protocol for termination criteria.

Each criterion tracks state across iterations and reports whether the NS run should stop.

check(iteration, emax)[source]

Update internal state and return True if termination condition met.

Parameters:
  • iteration (int) – Current NS iteration (0-indexed).

  • emax (float) – Energy (or enthalpy) of the dead point at this iteration.

Returns:

True if criterion is satisfied and NS should stop.

Return type:

bool

message()[source]

Human-readable description of why termination triggered.

Return type:

str