+
    –°³jòX  ã                   ó<  € ^ RI Ht ^ RIHt  ^ RIt. RNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#Nt ! R$ R4      t ! R% R&]4      tR' t ! R( R)]	]4      t
 ! R* R+]4      t ! R, R]4      t ! R- R.]4      t ! R/ R0]4      t ! R1 R2]4      t ! R3 R4]4      t ! R5 R6]4      t ! R7 R8]4      t ! R9 R:]4      t ! R; R<]4      t ! R= R>]4      t ! R? R@]4      t ! RA RB]4      t ! RC RD]4      t ! RE RF]4      t ! RG RH]4      t ! RI RJ]4      t ! RK RL]4      t ! RM RN]4      t ! RO RP]4      t ! RQ RR]4      t ! RS RT]4      t  ! RU RV]4      t! ! RW RX]4      t"]! 4       t#]
t$]t%]! 4       t&]! 4       t']! ^ 4      t(]! ^4      t)]t*]! 4       t+]%! ]+^4      t,]! RY4      t-]! RY4      t.]t/]t0]t1]t2]! RYRZ4      t3]t4]t5]! 4       t6]! 4       t7]! 4       t8]! 4       t9]! 4       t:]! 4       t;]! 4       t<] ! 4       t=]!t>]"t?R# )[é    )ÚCallable)ÚAnyNÚ
ConstraintÚbooleanÚcatÚcorr_choleskyÚ	dependentÚdependent_propertyÚgreater_thanÚgreater_than_eqÚindependentÚinteger_intervalÚintervalÚhalf_open_intervalÚis_dependentÚ	less_thanÚlower_choleskyÚlower_triangularÚMixtureSameFamilyConstraintÚmultinomialÚnonnegativeÚnonnegative_integerÚone_hotÚpositiveÚpositive_semidefiniteÚpositive_definiteÚpositive_integerÚrealÚreal_vectorÚsimplexÚsquareÚstackÚ	symmetricÚunit_intervalc                   ó8   a € ] tR t^Pt o RtRt^ tR tR tRt	V t
R# )r   a»  
Abstract base class for constraints.

A constraint object represents a region over which a variable is valid,
e.g. within which a variable can be optimized.

Attributes:
    is_discrete (bool): Whether constrained space is discrete.
        Defaults to False.
    event_dim (int): Number of rightmost dimensions that together define
        an event. The :meth:`check` method will remove this many dimensions
        when computing validity.
Fc                ó   € \         h)z{
Returns a byte tensor of ``sample_shape + batch_shape`` indicating
whether each event in value satisfies this constraint.
)ÚNotImplementedError©ÚselfÚvalues   &&Ú`/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/distributions/constraints.pyÚcheckÚConstraint.checkb   s
   € ô
 "Ð!ó    c                óJ   € V P                   P                  R ,          R,           # )ºé   NNz())Ú	__class__Ú__name__©r)   s   &r+   Ú__repr__ÚConstraint.__repr__i   s   € Ø�~‰~×&Ñ& rÕ*¨TÕ1Ð1r.   © N)r3   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úis_discreteÚ	event_dimr,   r5   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r+   r   r   P   s%   ø‡ € ñð €KØ€Iò"÷2ð 2r.   c                   ó’   a a€ ] tR t^mt oRtR]R]/V 3R llt]V3R lR l4       t]V3R lR l4       t	R]R]/R	 lt
R
 tRtVtV ;t# )Ú
_Dependenta!  
Placeholder for variables whose support depends on other variables.
These variables obey no simple coordinate-wise constraints.

Args:
    is_discrete (bool): Optional value of ``.is_discrete`` in case this
        can be computed statically. If not provided, access to the
        ``.is_discrete`` attribute will raise a NotImplementedError.
    event_dim (int): Optional value of ``.event_dim`` in case this
        can be computed statically. If not provided, access to the
        ``.event_dim`` attribute will raise a NotImplementedError.
r<   r=   c               ó<   <€ Wn         W n        \        SV `  4        R # ©N)Ú_is_discreteÚ
_event_dimÚsuperÚ__init__)r)   r<   r=   r2   s   &$$€r+   rI   Ú_Dependent.__init__{   s   ø€ Ø'ÔØ#ŒÜ‰ÑÖr.   c                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn©Úbool)ÚformatrA   s   "€r+   Ú__annotate__Ú_Dependent.__annotate__�   s   ø€ ÷ !ñ !™Tñ !r.   c                óX   € V P                   \        J d   \        R 4      hV P                   # )z,.is_discrete cannot be determined statically)rF   ÚNotImplementedr'   r4   s   &r+   r<   Ú_Dependent.is_discrete€   s(   € à×Ñ¤Ó.Ü%Ð&TÓUÐUØ× Ñ Ð r.   c                ó    <€ V ^8„  d   QhRS[ /# rL   ©Úint)rQ   rA   s   "€r+   rR   rS   ‡   s   ø€ ÷ ñ ™3ñ r.   c                óX   € V P                   \        J d   \        R 4      hV P                   # )z*.event_dim cannot be determined statically)rG   rU   r'   r4   s   &r+   r=   Ú_Dependent.event_dim†   s$   € à�?‰?œnÓ,Ü%Ð&RÓSÐSØ�‰Ðr.   c               ór   € V\         J d   V P                  pV\         J d   V P                  p\        WR7      # )zo
Support for syntax to customize static attributes::

    constraints.dependent(is_discrete=True, event_dim=1)
©r<   r=   )rU   rF   rG   rC   )r)   r<   r=   s   &$$r+   Ú__call__Ú_Dependent.__call__Œ   s3   € ð œ.Ó(Ø×+Ñ+ˆKØœÓ&ØŸ™ˆIÜ kÔGÐGr.   c                ó   € \        R 4      h)z1Cannot determine validity of dependent constraint)Ú
ValueError©r)   Úxs   &&r+   r,   Ú_Dependent.check˜   s   € ÜÐLÓMÐMr.   ©rG   rF   )r3   r8   r9   r:   r;   rU   rI   Úpropertyr<   r=   r^   r,   r>   r?   Ú__classcell__©r2   rA   s   @@r+   rC   rC   m   sg   ù‡ € ñð nð À÷ ð
 ÷!ó ð!ð
 ÷ó ðð

H nð 
HÀô 
H÷Nò Nr.   rC   c                ó"   € \        V \        4      # )a�  
Checks if ``constraint`` is a ``_Dependent`` object.

Args:
    constraint : A ``Constraint`` object.

Returns:
    ``bool``: True if ``constraint`` can be refined to the type ``_Dependent``, False otherwise.

Examples:
    >>> import torch
    >>> from torch.distributions import Bernoulli
    >>> from torch.distributions.constraints import is_dependent

    >>> dist = Bernoulli(probs=torch.tensor([0.6], requires_grad=True))
    >>> constraint1 = dist.arg_constraints["probs"]
    >>> constraint2 = dist.arg_constraints["logits"]

    >>> for constraint in [constraint1, constraint2]:
    >>>     if is_dependent(constraint):
    >>>         continue
)Ú
isinstancerC   )Ú
constraints   &r+   r   r   œ   s   € ô. �j¤*Ó-Ð-r.   c                   ód   a a€ ] tR t^¶t oRtR	R]R]/V3R lV 3R lllltV3R lR ltRtVt	V ;t
# )
Ú_DependentPropertyaŽ  
Decorator that extends @property to act like a `Dependent` constraint when
called on a class and act like a property when called on an object.

Example::

    class Uniform(Distribution):
        def __init__(self, low, high):
            self.low = low
            self.high = high

        @constraints.dependent_property(is_discrete=False, event_dim=0)
        def support(self):
            return constraints.interval(self.low, self.high)

Args:
    fn (Callable): The function to be decorated.
    is_discrete (bool): Optional value of ``.is_discrete`` in case this
        can be computed statically. If not provided, access to the
        ``.is_discrete`` attribute will raise a NotImplementedError.
    event_dim (int): Optional value of ``.event_dim`` in case this
        can be computed statically. If not provided, access to the
        ``.event_dim`` attribute will raise a NotImplementedError.
r<   r=   c                ón   <€ V ^8„  d   QhRS[ RS[3,          R,          RS[R,          RS[R,          RR/# )rM   Úfn.Nr<   r=   rN   )r   r   rP   rY   )rQ   rA   s   "€r+   rR   Ú_DependentProperty.__annotate__Ð   sI   ø€ ÷ 	$ñ 	$á�S™#�XÕ Õ%ð	$ñ ˜D•[ð		$ñ
 ˜•:ð	$ð 
ñ	$r.   c               ó>   <€ \         SV `  V4       W n        W0n        R # rE   )rH   rI   rF   rG   )r)   ro   r<   r=   r2   s   &&$$€r+   rI   Ú_DependentProperty.__init__Ð   s   ø€ ô 	‰Ñ˜ÔØ'ÔØ#Žr.   c                ó8   <€ V ^8„  d   QhRS[ RS[3,          RR/# )rM   ro   .rN   rm   )r   r   )rQ   rA   s   "€r+   rR   rp   Û   s%   ø€ ÷ 	
ñ 	
™8 C© HÕ-ð 	
Ð2Fñ 	
r.   c                óD   € \        WP                  V P                  R7      # )z”
Support for syntax to customize static attributes::

    @constraints.dependent_property(is_discrete=True, event_dim=1)
    def support(self): ...
r]   )rm   rF   rG   )r)   ro   s   &&r+   r^   Ú_DependentProperty.__call__Û   s    € ô "Ø×-Ñ-¸¿¹ô
ð 	
r.   re   rE   )r3   r8   r9   r:   r;   rU   rI   r^   r>   r?   rg   rh   s   @@r+   rm   rm   ¶   s7   ù‡ € ññ2	$ð $2ð		$ð
 !/÷	$ö 	$÷	
÷ 	
ð 	
r.   rm   c                   óz   a a€ ] tR t^çt oRtV 3R lt]V3R lR l4       t]V3R lR l4       tR t	R t
R	tVtV ;t# )
Ú_IndependentConstraintz«
Wraps a constraint by aggregating over ``reinterpreted_batch_ndims``-many
dims in :meth:`check`, so that an event is valid only if all its
independent entries are valid.
c                óB  <€ \        V\        4      '       g"   \        R \        V4      P                   24      h\        V\
        4      '       g"   \        R\        V4      P                   24      hV^ 8  d   \        RV 24      hWn        W n        \        SV `%  4        R# )ú*base_constraint must be a Constraint, got z.reinterpreted_batch_ndims must be an int, got z,reinterpreted_batch_ndims must be >= 0, got N)
rj   r   ÚAssertionErrorÚtyper3   rY   Úbase_constraintÚreinterpreted_batch_ndimsrH   rI   )r)   r|   r}   r2   s   &&&€r+   rI   Ú_IndependentConstraint.__init__î   s£   ø€ Ü˜/¬:×6Ò6Ü Ø<¼TÀ/Ó=R×=[Ñ=[Ð<\Ð]óð ô Ð3´S×9Ò9Ü Ø@ÄÐF_ÓA`×AiÑAiÐ@jÐkóð ð % qÔ(Ü Ø>Ð?XÐ>YÐZóð ð  /ÔØ)BÔ&Ü‰ÑÖr.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rO   )rQ   rA   s   "€r+   rR   Ú#_IndependentConstraint.__annotate__   ó   ø€ ÷ 0ñ 0™Tñ 0r.   c                ó.   € V P                   P                  # rE   ©r|   r<   r4   s   &r+   r<   Ú"_IndependentConstraint.is_discreteÿ   ó   € à×#Ñ#×/Ñ/Ð/r.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rX   )rQ   rA   s   "€r+   rR   r€     s   ø€ ÷ Oñ O™3ñ Or.   c                óP   € V P                   P                  V P                  ,           # rE   )r|   r=   r}   r4   s   &r+   r=   Ú _IndependentConstraint.event_dim  s   € à×#Ñ#×-Ñ-°×0NÑ0NÕNÐNr.   c                ó°  € V P                   P                  V4      pVP                  4       V P                  8  dG   V P                   P                  V P                  ,           p\        R V RVP                  4        24      hVP                  VP                  RVP                  4       V P                  ,
           R,           4      pVP                  R4      pV# )úExpected value.dim() >= ú	 but got Néÿÿÿÿ©rŒ   )	r|   r,   Údimr}   r=   ra   ÚreshapeÚshapeÚall)r)   r*   ÚresultÚexpecteds   &&  r+   r,   Ú_IndependentConstraint.check  s´   € Ø×%Ñ%×+Ñ+¨EÓ2ˆØ�:‰:‹<˜$×8Ñ8Ô8Ø×+Ñ+×5Ñ5¸×8VÑ8VÕVˆHÜØ*¨8¨*°I¸e¿i¹i»k¸]ÐKóð ð —‘Ø�L‰LÐH˜6Ÿ:™:›<¨$×*HÑ*HÕHÐIÈEÕQó
ˆð —‘˜B“ˆØˆr.   c                óˆ   € V P                   P                  R ,           R\        V P                  4       RV P                   R2# )r0   Ú(z, Ú))r2   r3   Úreprr|   r}   r4   s   &r+   r5   Ú_IndependentConstraint.__repr__  s?   € Ø—.‘.×)Ñ)¨"Õ-Ð.¨a´°T×5IÑ5IÓ0JÐ/KÈ2Èd×NlÑNlÐMmÐmnÐoÐor.   )r|   r}   ©r3   r8   r9   r:   r;   rI   rf   r<   r=   r,   r5   r>   r?   rg   rh   s   @@r+   rw   rw   ç   sJ   ù‡ € ñõð" ÷0ó ð0ð ÷Oó ðOò÷pò pr.   rw   c                   óz   a a€ ] tR tRt oRtV 3R lt]V3R lR l4       t]V3R lR l4       tR t	R	 t
R
tVtV ;t# )r   i  ax  
Constraint for the :class:`~torch.distributions.MixtureSameFamily`
distribution that adds back the rightmost batch dimension before
performing the validity check with the component distribution
constraint.

Args:
    base_constraint: The ``Constraint`` object of
        the component distribution of
        the :class:`~torch.distributions.MixtureSameFamily` distribution.
c                óž   <€ \        V\        4      '       g"   \        R \        V4      P                   24      hWn        \        SV `  4        R# )ry   N)rj   r   rz   r{   r3   r|   rH   rI   )r)   r|   r2   s   &&€r+   rI   Ú$MixtureSameFamilyConstraint.__init__%  sF   ø€ Ü˜/¬:×6Ò6Ü Ø<¼TÀ/Ó=R×=[Ñ=[Ð<\Ð]óð ð  /ÔÜ‰ÑÖr.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rO   )rQ   rA   s   "€r+   rR   Ú(MixtureSameFamilyConstraint.__annotate__.  r�   r.   c                ó.   € V P                   P                  # rE   rƒ   r4   s   &r+   r<   Ú'MixtureSameFamilyConstraint.is_discrete-  r…   r.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rX   )rQ   rA   s   "€r+   rR   rŸ   2  s   ø€ ÷ .ñ .™3ñ .r.   c                ó.   € V P                   P                  # rE   )r|   r=   r4   s   &r+   r=   Ú%MixtureSameFamilyConstraint.event_dim1  s   € à×#Ñ#×-Ñ-Ð-r.   c                ó¾  € VP                  RV P                  ,
          4      pV P                  P                  V4      pVP	                  4       V P                  8  d*   \        RV P                   RVP	                  4        24      hVP	                  4       V P                  ,
          pVP                  VP                  RV R,           4      pVP                  R4      pV# )z�
Check validity of ``value`` as a possible outcome of sampling
the :class:`~torch.distributions.MixtureSameFamily` distribution.
rŠ   r‹   NrŒ   r�   )	Ú	unsqueezer=   r|   r,   rŽ   ra   r�   r�   r‘   )r)   r*   Úunsqueezed_valuer’   Únum_dim_to_keeps   &&   r+   r,   Ú!MixtureSameFamilyConstraint.check5  s´   € ð
 !Ÿ?™?¨2°·±Õ+>Ó?ÐØ×%Ñ%×+Ñ+Ð,<Ó=ˆØ�9‰9‹;˜Ÿ™Ô'ÜØ*¨4¯>©>Ð*:¸)ÀEÇIÁIÃKÀ=ÐQóð ð  Ÿ)™)›+¨¯©Õ6ˆØ—‘ §¡Ð-=¨oÐ >ÀÕ FÓGˆØ—‘˜B“ˆØˆr.   c                ó`   € V P                   P                   R \        V P                  4       R2# )r–   r—   )r2   r3   r˜   r|   r4   s   &r+   r5   Ú$MixtureSameFamilyConstraint.__repr__E  s,   € Ø—.‘.×)Ñ)Ð*¨!¬D°×1EÑ1EÓ,FÐ+GÀqÐIÐIr.   )r|   rš   rh   s   @@r+   r   r     sH   ù‡ € ñ
õð ÷0ó ð0ð ÷.ó ð.ò÷ Jò Jr.   c                   ó.   a € ] tR tRt o RtRtR tRtV tR# )Ú_BooleaniI  z'
Constrain to the two values `{0, 1}`.
Tc                ó    € V^ 8H  V^8H  ,          # ©r   r7   r(   s   &&r+   r,   Ú_Boolean.checkP  s   € Ø˜‘
˜u¨™zÕ*Ð*r.   r7   N)	r3   r8   r9   r:   r;   r<   r,   r>   r?   r@   s   @r+   r­   r­   I  s   ø‡ € ñð €K÷+ð +r.   r­   c                   ó2   a € ] tR tRt o RtRt^tR tRtV t	R# )Ú_OneHotiT  z
Constrain to one-hot vectors.
Tc                ó�   € V^ 8H  V^8H  ,          pVP                  R4      P                  ^4      pVP                  R4      V,          # ©r   rŒ   )ÚsumÚeqr‘   )r)   r*   Ú
is_booleanÚis_normalizeds   &&  r+   r,   Ú_OneHot.check\  s@   € Ø˜q‘j U¨a¡ZÕ0ˆ
ØŸ	™	 "›×(Ñ(¨Ó+ˆØ�~‰~˜bÓ! MÕ1Ð1r.   r7   N)
r3   r8   r9   r:   r;   r<   r=   r,   r>   r?   r@   s   @r+   r²   r²   T  s    ø‡ € ñð €KØ€I÷2ð 2r.   r²   c                   óF   a a€ ] tR tRt oRtRtV 3R ltR tR tRt	Vt
V ;t# )Ú_IntegerIntervalib  z@
Constrain to an integer interval `[lower_bound, upper_bound]`.
Tc                ó<   <€ Wn         W n        \        SV `  4        R # rE   ©Úlower_boundÚupper_boundrH   rI   ©r)   r¾   r¿   r2   s   &&&€r+   rI   Ú_IntegerInterval.__init__i  ó   ø€ Ø&ÔØ&ÔÜ‰ÑÖr.   c                óh   € V^,          ^ 8H  V P                   V8*  ,          WP                  8*  ,          # ©r1   ©r¾   r¿   r(   s   &&r+   r,   Ú_IntegerInterval.checkn  s0   € à�Q�Y˜!‰^ × 0Ñ 0°EÑ 9Õ:¸e×GWÑGWÑ>WÕXð	
r.   c                óˆ   € V P                   P                  R ,          pVRV P                   RV P                   R2,          pV# ©r0   ú(lower_bound=z, upper_bound=r—   ©r2   r3   r¾   r¿   ©r)   Ú
fmt_strings   & r+   r5   Ú_IntegerInterval.__repr__s  óH   € Ø—^‘^×,Ñ,¨RÕ0ˆ
ØØ˜D×,Ñ,Ð-¨^¸D×<LÑ<LÐ;MÈQÐOõ	
ˆ
ð Ðr.   rÅ   ©r3   r8   r9   r:   r;   r<   rI   r,   r5   r>   r?   rg   rh   s   @@r+   r»   r»   b  s%   ù‡ € ñð €Kõò

÷
ò r.   r»   c                   óF   a a€ ] tR tRt oRtRtV 3R ltR tR tRt	Vt
V ;t# )Ú_IntegerLessThani{  z9
Constrain to an integer interval `(-inf, upper_bound]`.
Tc                ó0   <€ Wn         \        SV `	  4        R # rE   ©r¿   rH   rI   ©r)   r¿   r2   s   &&€r+   rI   Ú_IntegerLessThan.__init__‚  ó   ø€ Ø&ÔÜ‰ÑÖr.   c                ó@   € V^,          ^ 8H  WP                   8*  ,          # rÄ   ©r¿   r(   s   &&r+   r,   Ú_IntegerLessThan.check†  ó   € Ø˜•	˜Q‘ 5×,<Ñ,<Ñ#<Õ=Ð=r.   c                ón   € V P                   P                  R ,          pVRV P                   R2,          pV# ©r0   z(upper_bound=r—   ©r2   r3   r¿   rË   s   & r+   r5   Ú_IntegerLessThan.__repr__‰  ó6   € Ø—^‘^×,Ñ,¨RÕ0ˆ
Ø˜ d×&6Ñ&6Ð%7°qÐ9Õ9ˆ
ØÐr.   rØ   rÏ   rh   s   @@r+   rÑ   rÑ   {  ó%   ù‡ € ñð €Kõò>÷ò r.   rÑ   c                   óF   a a€ ] tR tRt oRtRtV 3R ltR tR tRt	Vt
V ;t# )Ú_IntegerGreaterThani�  z8
Constrain to an integer interval `[lower_bound, inf)`.
Tc                ó0   <€ Wn         \        SV `	  4        R # rE   ©r¾   rH   rI   ©r)   r¾   r2   s   &&€r+   rI   Ú_IntegerGreaterThan.__init__–  rÖ   r.   c                ó@   € V^,          ^ 8H  WP                   8¬  ,          # rÄ   ©r¾   r(   s   &&r+   r,   Ú_IntegerGreaterThan.checkš  rÚ   r.   c                ón   € V P                   P                  R ,          pVRV P                   R2,          pV# ©r0   rÉ   r—   ©r2   r3   r¾   rË   s   & r+   r5   Ú_IntegerGreaterThan.__repr__�  rß   r.   rè   rÏ   rh   s   @@r+   râ   râ   �  rà   r.   râ   c                   ó*   a € ] tR tRt o RtR tRtV tR# )Ú_Reali£  z>
Trivially constrain to the extended real line `[-inf, inf]`.
c                ó
   € W8H  # rE   r7   r(   s   &&r+   r,   Ú_Real.check¨  s
   € Ø‰~Ðr.   r7   N)r3   r8   r9   r:   r;   r,   r>   r?   r@   s   @r+   rï   rï   £  s   ø‡ € ñ÷ð r.   rï   c                   óB   a a€ ] tR tRt oRtV 3R ltR tR tRtVt	V ;t
# )Ú_GreaterThani¬  z5
Constrain to a real half line `(lower_bound, inf]`.
c                ó0   <€ Wn         \        SV `	  4        R # rE   rä   rå   s   &&€r+   rI   Ú_GreaterThan.__init__±  rÖ   r.   c                ó    € V P                   V8  # rE   rè   r(   s   &&r+   r,   Ú_GreaterThan.checkµ  s   € Ø×Ñ %Ñ'Ð'r.   c                ón   € V P                   P                  R ,          pVRV P                   R2,          pV# rë   rì   rË   s   & r+   r5   Ú_GreaterThan.__repr__¸  rß   r.   rè   ©r3   r8   r9   r:   r;   rI   r,   r5   r>   r?   rg   rh   s   @@r+   ró   ró   ¬  ó   ù‡ € ñõò(÷ò r.   ró   c                   óB   a a€ ] tR tRt oRtV 3R ltR tR tRtVt	V ;t
# )Ú_GreaterThanEqi¾  z5
Constrain to a real half line `[lower_bound, inf)`.
c                ó0   <€ Wn         \        SV `	  4        R # rE   rä   rå   s   &&€r+   rI   Ú_GreaterThanEq.__init__Ã  rÖ   r.   c                ó    € V P                   V8*  # rE   rè   r(   s   &&r+   r,   Ú_GreaterThanEq.checkÇ  s   € Ø×Ñ 5Ñ(Ð(r.   c                ón   € V P                   P                  R ,          pVRV P                   R2,          pV# rë   rì   rË   s   & r+   r5   Ú_GreaterThanEq.__repr__Ê  rß   r.   rè   rú   rh   s   @@r+   rý   rý   ¾  s   ù‡ € ñõò)÷ò r.   rý   c                   óB   a a€ ] tR tRt oRtV 3R ltR tR tRtVt	V ;t
# )Ú	_LessThaniÐ  z6
Constrain to a real half line `[-inf, upper_bound)`.
c                ó0   <€ Wn         \        SV `	  4        R # rE   rÓ   rÔ   s   &&€r+   rI   Ú_LessThan.__init__Õ  rÖ   r.   c                ó   € WP                   8  # rE   rØ   r(   s   &&r+   r,   Ú_LessThan.checkÙ  s   € Ø×'Ñ'Ñ'Ð'r.   c                ón   € V P                   P                  R ,          pVRV P                   R2,          pV# rÜ   rÝ   rË   s   & r+   r5   Ú_LessThan.__repr__Ü  rß   r.   rØ   rú   rh   s   @@r+   r  r  Ð  rû   r.   r  c                   óB   a a€ ] tR tRt oRtV 3R ltR tR tRtVt	V ;t
# )Ú	_Intervaliâ  z<
Constrain to a real interval `[lower_bound, upper_bound]`.
c                ó<   <€ Wn         W n        \        SV `  4        R # rE   r½   rÀ   s   &&&€r+   rI   Ú_Interval.__init__ç  rÂ   r.   c                óF   € V P                   V8*  WP                  8*  ,          # rE   rÅ   r(   s   &&r+   r,   Ú_Interval.checkì  s!   € Ø× Ñ  EÑ)¨e×7GÑ7GÑ.GÕHÐHr.   c                óˆ   € V P                   P                  R ,          pVRV P                   RV P                   R2,          pV# rÈ   rÊ   rË   s   & r+   r5   Ú_Interval.__repr__ï  rÎ   r.   rÅ   rú   rh   s   @@r+   r  r  â  s   ù‡ € ñõò
I÷ò r.   r  c                   óB   a a€ ] tR tRt oRtV 3R ltR tR tRtVt	V ;t
# )Ú_HalfOpenIntervali÷  z<
Constrain to a real interval `[lower_bound, upper_bound)`.
c                ó<   <€ Wn         W n        \        SV `  4        R # rE   r½   rÀ   s   &&&€r+   rI   Ú_HalfOpenInterval.__init__ü  rÂ   r.   c                óF   € V P                   V8*  WP                  8  ,          # rE   rÅ   r(   s   &&r+   r,   Ú_HalfOpenInterval.check  s!   € Ø× Ñ  EÑ)¨e×6FÑ6FÑ.FÕGÐGr.   c                óˆ   € V P                   P                  R ,          pVRV P                   RV P                   R2,          pV# rÈ   rÊ   rË   s   & r+   r5   Ú_HalfOpenInterval.__repr__  rÎ   r.   rÅ   rú   rh   s   @@r+   r  r  ÷  s   ù‡ € ñõò
H÷ò r.   r  c                   ó.   a € ] tR tRt o Rt^tR tRtV tR# )Ú_Simplexi  zt
Constrain to the unit simplex in the innermost (rightmost) dimension.
Specifically: `x >= 0` and `x.sum(-1) == 1`.
c                ó”   € \         P                  ! V^ 8¬  RR7      VP                  R4      ^,
          P                  4       R8  ,          # )r   ©rŽ   ç�íµ ÷Æ°>rŒ   )Útorchr‘   rµ   Úabsr(   s   &&r+   r,   Ú_Simplex.check  s7   € Ü�yŠy˜ !™¨Ô,°·±¸2³ÀÕ1B×0GÑ0GÓ0IÈDÑ0PÕQÐQr.   r7   N©	r3   r8   r9   r:   r;   r=   r,   r>   r?   r@   s   @r+   r  r    s   ø‡ € ñð
 €I÷Rð Rr.   r  c                   ó8   a € ] tR tRt o RtRt^tR tR tRt	V t
R# )Ú_Multinomiali  a  
Constrain to nonnegative integer values summing to at most an upper bound.

Note due to limitations of the Multinomial distribution, this currently
checks the weaker condition ``value.sum(-1) <= upper_bound``. In the future
this may be strengthened to ``value.sum(-1) == upper_bound``.
Tc                ó   € Wn         R # rE   rØ   )r)   r¿   s   &&r+   rI   Ú_Multinomial.__init__$  s   € Ø&Ör.   c                ót   € V^ 8¬  P                  RR7      VP                  RR7      V P                  8*  ,          # )r   r  rŒ   )r‘   rµ   r¿   rb   s   &&r+   r,   Ú_Multinomial.check'  s1   € Ø�Q‘�|‰| ˆ|Ó# q§u¡u° u£}¸×8HÑ8HÑ'HÕIÐIr.   rØ   N)r3   r8   r9   r:   r;   r<   r=   rI   r,   r>   r?   r@   s   @r+   r&  r&    s'   ø‡ € ñð €KØ€Iò'÷Jð Jr.   r&  c                   ó.   a € ] tR tRt o Rt^tR tRtV tR# )Ú_LowerTriangulari+  z0
Constrain to lower-triangular square matrices.
c                óœ   € VP                  4       pW!8H  P                  VP                  R R R,           4      P                  R4      ^ ,          # )NéþÿÿÿrŒ   r�   )ÚtrilÚviewr�   Úmin)r)   r*   Ú
value_trils   && r+   r,   Ú_LowerTriangular.check2  sA   € Ø—Z‘Z“\ˆ
ØÑ#×)Ñ)¨%¯+©+°c°rÐ*:¸UÕ*BÓC×GÑGÈÓKÈAÕNÐNr.   r7   Nr$  r@   s   @r+   r,  r,  +  s   ø‡ € ñð €I÷Oð Or.   r,  c                   ó.   a € ] tR tRt o Rt^tR tRtV tR# )Ú_LowerCholeskyi7  zH
Constrain to lower-triangular square matrices with positive diagonals.
c                ó  € VP                  4       pW!8H  P                  VP                  R R R,           4      P                  R4      ^ ,          pVP	                  RRR7      ^ 8„  P                  R4      ^ ,          pW4,          # )N)Údim1Údim2r.  rŒ   r�   )r/  r0  r�   r1  Údiagonal)r)   r*   r2  r   Úpositive_diagonals   &&   r+   r,   Ú_LowerCholesky.check>  sv   € Ø—Z‘Z“\ˆ
àÑ ×&Ñ& u§{¡{°3°BÐ'7¸%Õ'?Ó@×DÑDÀRÓHÈÕKð 	ð #Ÿ^™^°¸"˜^Ó=ÀÑA×FÑFÀrÓJÈ1ÕMÐØÕ3Ð3r.   r7   Nr$  r@   s   @r+   r5  r5  7  s   ø‡ € ñð €I÷4ð 4r.   r5  c                   ó.   a € ] tR tRt o Rt^tR tRtV tR# )Ú_CorrCholeskyiH  zq
Constrain to lower-triangular square matrices with positive diagonals and each
row vector being of unit length.
c                óš  € \         P                  ! VP                  4      P                  VP	                  R4      ,          ^
,          p\         P
                  P                  VP                  4       RR7      pVR,
          P                  4       P                  V4      P                  RR7      p\        4       P                  V4      V,          # )r1   r  ç      ð?rŒ   )r!  ÚfinfoÚdtypeÚepsÚsizeÚlinalgÚnormÚdetachr"  Úler‘   r5  r,   )r)   r*   ÚtolÚrow_normÚunit_row_norms   &&   r+   r,   Ú_CorrCholesky.checkP  s”   € ä�KŠK˜Ÿ™Ó$×(Ñ(¨5¯:©:°b«>Õ9¸BÕ>ð 	ô —<‘<×$Ñ$ U§\¡\£^¸Ð$Ó<ˆØ! C�×,Ñ,Ó.×1Ñ1°#Ó6×:Ñ:¸rÐ:ÓBˆÜÓ×%Ñ% eÓ,¨}Õ<Ð<r.   r7   Nr$  r@   s   @r+   r=  r=  H  s   ø‡ € ñð
 €I÷=ð =r.   r=  c                   ó.   a € ] tR tRt o Rt^tR tRtV tR# )Ú_SquareiY  z
Constrain to square matrices.
c                óÊ   € \         P                  ! VP                  R R VP                  R,          VP                  R,          8H  \         P                  VP                  R7      # )N)rC  Ú
fill_valuerA  Údevicer.  rŒ   )r!  Úfullr�   rP   rP  r(   s   &&r+   r,   Ú_Square.check`  sG   € Ü�zŠzØ—‘˜S˜bÐ!ØŸ™ B�¨5¯;©;°r­?Ñ:Ü—*‘*Ø—<‘<ô	
ð 	
r.   r7   Nr$  r@   s   @r+   rM  rM  Y  s   ø‡ € ñð €I÷
ð 
r.   rM  c                   ó6   a a€ ] tR tRt oRtV 3R ltRtVtV ;t# )Ú
_Symmetricii  z)
Constrain to Symmetric square matrices.
c                óÒ   <€ \         SV `  V4      pVP                  4       '       g   V# \        P                  ! WP
                  R R7      P                  R4      P                  R4      # )r   )Úatolr.  rŒ   )rH   r,   r‘   r!  ÚiscloseÚmT)r)   r*   Úsquare_checkr2   s   && €r+   r,   Ú_Symmetric.checkn  sQ   ø€ Ü‘w‘} UÓ+ˆØ×Ñ×!Ò!ØÐÜ�}Š}˜U§H¡H°4Ô8×<Ñ<¸RÓ@×DÑDÀRÓHÐHr.   r7   ©	r3   r8   r9   r:   r;   r,   r>   r?   rg   rh   s   @@r+   rT  rT  i  s   ù‡ € ñ÷Iõ Ir.   rT  c                   ó6   a a€ ] tR tRt oRtV 3R ltRtVtV ;t# )Ú_PositiveSemidefiniteiu  z.
Constrain to positive-semidefinite matrices.
c                óÌ   <€ \         SV `  V4      pVP                  4       '       g   V# \        P                  P                  V4      P                  ^ 4      P                  R4      # r´   )rH   r,   r‘   r!  rD  ÚeigvalshÚge©r)   r*   Ú	sym_checkr2   s   && €r+   r,   Ú_PositiveSemidefinite.checkz  sM   ø€ Ü‘G‘M %Ó(ˆ	Ø�}‰}�ŠØÐÜ�|‰|×$Ñ$ UÓ+×.Ñ.¨qÓ1×5Ñ5°bÓ9Ð9r.   r7   r[  rh   s   @@r+   r]  r]  u  ó   ù‡ € ñ÷:õ :r.   r]  c                   ó6   a a€ ] tR tRt oRtV 3R ltRtVtV ;t# )Ú_PositiveDefinitei�  z*
Constrain to positive-definite matrices.
c                óÂ   <€ \         SV `  V4      pVP                  4       '       g   V# \        P                  P                  V4      P                  P                  ^ 4      # r¯   )rH   r,   r‘   r!  rD  Úcholesky_exÚinfor¶   ra  s   && €r+   r,   Ú_PositiveDefinite.check†  sH   ø€ Ü‘G‘M %Ó(ˆ	Ø�}‰}�ŠØÐÜ�|‰|×'Ñ'¨Ó.×3Ñ3×6Ñ6°qÓ9Ð9r.   r7   r[  rh   s   @@r+   rf  rf  �  rd  r.   rf  c                   óx   a a€ ] tR tRt oRtR
V 3R llt]V3R lR l4       t]V3R lR l4       tR t	R	t
VtV ;t# )Ú_Cati�  z²
Constraint functor that applies a sequence of constraints
`cseq` at the submatrices at dimension `dim`,
each of size `lengths[dim]`, in a way compatible with :func:`torch.cat`.
c                ó  <€ \         ;QJ d    R  V 4       F  '       d   K   RM	  RM! R  V 4       4      '       g   \        R4      h\        V4      V n        Vf   ^.\	        V P                  4      ,          p\        V4      V n        \	        V P
                  4      \	        V P                  4      8w  d9   \        R\	        V P
                  4       R\	        V P                  4       R24      hW n        \        SV `!  4        R# )c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5irE   ©rj   r   ©Ú.0Úcs   & r+   Ú	<genexpr>Ú _Cat.__init__.<locals>.<genexpr>•  ó   é € Ð;±d°”:˜a¤×,Ð,³dùó   ‚FTú1All elements of cseq must be Constraint instancesNz	lengths (z) must match cseq (r—   )	r‘   rz   ÚlistÚcseqÚlenÚlengthsrŽ   rH   rI   )r)   ry  rŽ   r{  r2   s   &&&&€r+   rI   Ú_Cat.__init__”  s¾   ø€ ß‹sÑ;±dÓ;�s�sŠsÑ;±dÓ;×;Ò;Ü Ð!TÓUÐUÜ˜“JˆŒ	ØŠ?Ø�cœC §	¡	›NÕ*ˆGÜ˜G“}ˆŒÜˆt�|‰|Ó¤ D§I¡I£Ô.Ü ØœC §¡Ó-Ð.Ð.AÄ#ÀdÇiÁiÃ.ÐAQÐQRÐSóð ð ŒÜ‰ÑÖr.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rO   )rQ   rA   s   "€r+   rR   Ú_Cat.__annotate__£  ó   ø€ ÷ 5ñ 5™Tñ 5r.   c                ó’   € \         ;QJ d&    R  V P                   4       F  '       g   K   R# 	  R# ! R  V P                   4       4      # )c              3   ó8   "  € T F  qP                   x € K  	  R # 5irE   ©r<   rp  s   & r+   rs  Ú#_Cat.is_discrete.<locals>.<genexpr>¤  ó   é € Ð4©) Q—=–=«)ùó   ‚TF©Úanyry  r4   s   &r+   r<   Ú_Cat.is_discrete¢  ó3   € ç‹sÑ4¨$¯)ª)Ó4�sŒsÐ4ŠsÐ4ˆsÑ4¨$¯)ª)Ó4Ó4Ð4r.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rX   )rQ   rA   s   "€r+   rR   r~  §  s   ø€ ÷ 3ñ 3™3ñ 3r.   c                ó:   € \        R  V P                   4       4      # )c              3   ó8   "  € T F  qP                   x € K  	  R # 5irE   ©r=   rp  s   & r+   rs  Ú!_Cat.event_dim.<locals>.<genexpr>¨  s   é € Ð2©	 1—;–;«	ùr…  )Úmaxry  r4   s   &r+   r=   Ú_Cat.event_dim¦  s   € äÑ2¨¯	ª	Ó2Ó2Ð2r.   c                óè  € VP                  4       ) V P                   u;8:  d   VP                  4       8  g-   M \        R V P                    RVP                  4        R24      h. p^ p\        V P                  V P                  4       FI  w  rEVP                  V P                   W54      pVP                  VP                  V4      4       W5,           pKK  	  \        P                  ! W P                   4      # ©zdim z out of range for value with z dimensions)
rŽ   rz   Úzipry  r{  ÚnarrowÚappendr,   r!  r   )r)   r*   ÚchecksÚstartÚconstrÚlengthÚvs   &&     r+   r,   Ú
_Cat.checkª  s¶   € Ø—‘“� §¡Ö6¨5¯9©9«;Ö6Ü Ø�t—x‘x�jÐ =¸e¿i¹i»k¸]È+ÐVóð ð ˆØˆÜ! $§)¡)¨T¯\©\Ö:‰NˆFØ—‘˜TŸX™X uÓ5ˆAØ�M‰M˜&Ÿ,™, q›/Ô*Ø•NŠEñ ;ô �yŠy˜§¡Ó*Ð*r.   )ry  rŽ   r{  )r   N©r3   r8   r9   r:   r;   rI   rf   r<   r=   r,   r>   r?   rg   rh   s   @@r+   rl  rl  �  sA   ù‡ € ñ÷ð ÷5ó ð5ð ÷3ó ð3÷+ò +r.   rl  c                   óx   a a€ ] tR tRt oRtR
V 3R llt]V3R lR l4       t]V3R lR l4       tR t	R	t
VtV ;t# )Ú_Stacki¸  z—
Constraint functor that applies a sequence of constraints
`cseq` at the submatrices at dimension `dim`,
in a way compatible with :func:`torch.stack`.
c                óÚ   <€ \         ;QJ d    R  V 4       F  '       d   K   RM	  RM! R  V 4       4      '       g   \        R4      h\        V4      V n        W n        \
        SV `  4        R# )c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5irE   ro  rp  s   & r+   rs  Ú"_Stack.__init__.<locals>.<genexpr>À  ru  rv  FTrw  N)r‘   rz   rx  ry  rŽ   rH   rI   )r)   ry  rŽ   r2   s   &&&€r+   rI   Ú_Stack.__init__¿  sK   ø€ ß‹sÑ;±dÓ;�s�sŠsÑ;±dÓ;×;Ò;Ü Ð!TÓUÐUÜ˜“JˆŒ	ØŒÜ‰ÑÖr.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rO   )rQ   rA   s   "€r+   rR   Ú_Stack.__annotate__Ç  r  r.   c                ó’   € \         ;QJ d&    R  V P                   4       F  '       g   K   R# 	  R# ! R  V P                   4       4      # )c              3   ó8   "  € T F  qP                   x € K  	  R # 5irE   r‚  rp  s   & r+   rs  Ú%_Stack.is_discrete.<locals>.<genexpr>È  r„  r…  TFr†  r4   s   &r+   r<   Ú_Stack.is_discreteÆ  r‰  r.   c                ó    <€ V ^8„  d   QhRS[ /# rL   rX   )rQ   rA   s   "€r+   rR   r¤  Ë  s   ø€ ÷ ñ ™3ñ r.   c                ó€   € \        R  V P                   4       4      pV P                  V,           ^ 8  d
   V^,          pV# )c              3   ó8   "  € T F  qP                   x € K  	  R # 5irE   r�  rp  s   & r+   rs  Ú#_Stack.event_dim.<locals>.<genexpr>Ì  s   é € Ð1¡y !—+–+£yùr…  )r�  ry  rŽ   )r)   rŽ   s   & r+   r=   Ú_Stack.event_dimÊ  s4   € äÑ1 t§y¢yÓ1Ó1ˆØ�8‰8�c�>˜AÔØ�1�HˆCØˆ
r.   c           	     ó"  € VP                  4       ) V P                   u;8:  d   VP                  4       8  g-   M \        R V P                    RVP                  4        R24      h\        VP                  V P                   4      4       Uu. uF  q!P	                  V P                   V4      NK   	  pp\
        P                  ! \        W0P                  4       UUu. uF  w  rEVP                  V4      NK  	  uppV P                   4      # u upi u uppi r’  )
rŽ   rz   ÚrangerC  Úselectr!  r"   r“  ry  r,   )r)   r*   ÚiÚvsrš  r˜  s   &&    r+   r,   Ú_Stack.checkÑ  sÉ   € Ø—‘“� §¡Ö6¨5¯9©9«;Ö6Ü Ø�t—x‘x�jÐ =¸e¿i¹i»k¸]È+ÐVóð ô 27°u·z±zÀ$Ç(Á(Ó7KÔ1LÓMÑ1L¨A�l‰l˜4Ÿ8™8 QÖ'Ñ1LˆÐMÜ�{Š{Ü.1°"·i±iÔ.@ÔAÑ.@¡ ˆV�\‰\˜!Ž_Ñ.@ÒAÀ4Ç8Á8ó
ð 	
ùò NùãAs   Â	$DÃD
)ry  rŽ   r¯   rœ  rh   s   @@r+   rž  rž  ¸  sA   ù‡ € ñ÷ð ÷5ó ð5ð ÷ó ð÷
ò 
r.   rž  g        r?  )@Úcollections.abcr   Útypingr   r!  Ú__all__r   rC   r   rf   rm   rw   r   r­   r²   r»   rÑ   râ   rï   ró   rý   r  r  r  r  r&  r,  r5  r=  rM  rT  r]  rf  rl  rž  r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r$   r   r   r    r   r   r   r!   r#   r   r   r   r"   r7   r.   r+   Ú<module>r·     s”  ðõ %Ý ð óD ð!Øð!àð!ð 
ð!ð ð	!ð
 ð!ð ð!ð ð!ð ð!ð ð!ð ð!ð ð!ð ð!ð ð!ð ð!ð ð!ð  ð!!ð" "ð#!ð$ ð%!ð& ð'!ð( ð)!ð* ð+!ð, ð-!ð. ð/!ð0 ð1!ð2 ð3!ð4 ð5!ð6 ð7!ð8 ð9!ð: ð;!ð< ð=!ð> ð?!ð@ ðA!€÷H2ñ 2ô:,N�ô ,Nò^.ô4.
˜ :ô .
ôb.p˜Zô .pôb.J *ô .Jôb+ˆzô +ô2ˆjô 2ô�zô ô2�zô ô(˜*ô ô(ˆJô ô�:ô ô$�Zô ô$�
ô ô$�
ô ô*˜
ô ô*	Rˆzô 	RôJ�:ô Jô&	O�zô 	Oô4�Zô 4ô"=�Jô =ô"
ˆjô 
ô 	I�ô 	Iô	:˜Jô 	:ô	:˜
ô 	:ô(+ˆ:ô (+ôV!
ˆZô !
ñJ ‹L€	Ø'Ð Ø$€Ù
‹*€Ù
‹)€Ù)¨!Ó,Ð Ù& qÓ)Ð Ø#Ð Ùƒw€Ù˜$ Ó"€Ù˜Ó€Ù˜SÓ!€Ø€Ø €Ø€	Ø€Ù˜#˜sÓ#€Ø€Ø&Ð Ù
‹*€Ù#Ó%Ð ÙÓ!€Ù“€Ù	‹€Ù‹L€	Ù-Ó/Ð Ù%Ó'Ð Ø
€Ø‚r.   