ConstraintDescriptor

class jaxrens.constraints.base.ConstraintDescriptor(name, depends_on, build, build_kwargs=<factory>, reject_reason=4)[source]

Bases: object

Declarative description of one constraint type for the sampler.

Variables:
  • name (str) – Human-readable label (e.g. "minimum_distance").

  • depends_on (frozenset[str]) – State aspects the predicate reads. Must be a subset of ASPECTS. Used to pair the constraint with the moves that can violate it.

  • build (Callable[[...], Constraint]) – Factory called as build(**build_kwargs) to produce the Constraint predicate. Deferred so the (possibly array- valued) parameters are captured once at sampler-assembly time.

  • build_kwargs (dict[str, Any]) – Keyword arguments forwarded to build.

  • reject_reason (int) – MoveInfo.reject_reason bucket reported when this constraint causes a rejection. Default 4.

Parameters: