+
    Y°³jÈ±  ã                   óÎ   € ^ RI t ^ RIt^ RIHt ^RIHt ]P                  ! ]4      P                  t
]P                  ! ]4      P                  tR tR tR tR tR tR	 tR
 tR tR# )é    N)Úqr)Úget_arrays_tolc                óü  € V'       Ed|   \        V \        P                  4      '       d   V P                  ^8X  g   Q h\        P
                  ! V4      P                  V 4      '       g   Q h\        V\        P                  4      '       d   VP                  V P                  8X  g   Q h\        V\        P                  4      '       d   VP                  V P                  8X  g   Q h\        V\        4      '       g   Q h\        V\        4      '       g   Q h\        W#4      p\        P                  ! W'8*  4      '       g   Q h\        P                  ! W7) 8¬  4      '       g   Q h\        P                  ! V4      '       d   VR8”  g   Q h\        P                  ! VR4      p\        P                  ! VR4      pV P                  p\        P                   ! V 4      p \        P                   ! V 4      p	VR8  V R8  ,          VR8„  V R8„  ,          ,          p
\        P"                  ! V 4      p\        P"                  ! V4      pW
,          ) WÊ&   ^ pRpRpV\        P$                  ! V
4      8  Ed   W,          pVR
\&        ,          V,          \)        R\        P*                  P-                  V 4      4      ,          8¼  d   EMÌ \/        W¼V4      pT) T,          RT,          8:  d   EM§T! T4      pTT,          pT\2        \5        T4      ,          8”  d   \)        T) T,          R4      pM\        P6                  p\9        TT4      pT) TRT,          T,          ,           ,          RT,          8:  d   EMT\        P6                  ) 8„  T\2        ) \        P4                  ! Y+,
          4      ,          8  ,          pT\        P6                  8  T\2        \        P4                  ! Y;,
          4      ,          8„  ,          p\        P:                  ! T\        P6                  4      p\        P:                  ! T\        P6                  4      p\        P                  ! TT,          TT,          ,
          TT,          ,          R4      TT&   \        P                  ! TT,          TT,          ,
          TT,          ,          R4      TT&   \        P8                  ! T4      p\        P8                  ! T4      p\9        TT4      p\9        TT4      pTR8”  dv   \        P<                  ! Yº,          TYÊ,          ,          ,           Y*,          Y:,          4      Yº&   T TT,          ,          p TTTRT,          T,          ,           ,          ,          pT\9        TT4      8  dM   Y
,          TT
,          ,          T,          pTYÊ,          ,          Y
,          ,
          YÊ&   RYÊ( &   T^,          pEKƒ  TT8  dg   TT8:  d$   \        P>                  ! T4      pTT,          TT&   M"\        P>                  ! T4      pTT,          TT&   RT
T&   Y
,          ) YÊ&   RYÊ( &   ^ pEKð  TT8:  d   \A        T4      pTT,          TT&   RT
T&   TT8:  d   \A        T4      pTT,          TT&   RT
T&   Rp VPC                  RR4      '       EdØ   V'       EdÏ   \        P                   ! V4      pV	V,          RV,          V! V4      ,          ,           p \        P$                  ! V
4      ^ 8”  EdO   Wº,          Wº,          ,          p!W
,          W
,          ,          p"W
,          Wº,          ,          p#\        PD                  ! \)        V!V",          V#R,          ,
          R4      4      ) pV#Wº,          ,          V!W
,          ,          ,
          WÊ&   RWÊ( &   VRV,          8¼  gF   \        PF                  ! V\2        ) \        P4                  ! WÊ,          4      ,          8¬  4      '       d   EMZWÊ;;,          V) ,          uu&   \        PH                  ! V4      p$\        PH                  ! V4      p%Wº,          R,          WÊ,          R,          ,           W*,          R,          ,
          V$V
&   Wº,          R,          WÊ,          R,          ,           W:,          R,          ,
          V%V
&   \        PD                  ! V$V$R8„  ,          4      VV$R8„  ,          ,
          V$V$R8„  &   \        PD                  ! V%V%R8„  ,          4      VV%R8„  ,          ,           V%V%R8„  &   \        P                  ! W²,
          R4      p&\        P                  ! W;,
          R4      p'V$\2        V&,          8„  pV%\2        V',          8„  p\        PJ                  ! V4      p(\        PJ                  ! V4      p)\        P                  ! V(V,          V&V,          V$V,          ,          4      V(V&   \        P                  ! V)V,          V'V,          V%V,          ,          4      V)V&   \        P8                  ! V(4      p*\        P8                  ! V)4      p+\9        V*V+4      p,V! V4      p-V! V4      pVV-,          p.VV,          pVV,          p/^p0\M        V0^,
          V,,          ^,           4      p0\        PN                  ! V,V0,          V,V04      p1RV1,          RV1R,          ,           ,          p2V2V#V1,          V,
          V1V.,          ,
          V2V1V/,          RVV.,
          ,          ,
          ,          ,           ,          p3\        P                  ! V3R8*  4      '       d   EM\        PP                  ! V34      p4RV1V4,          R,          ,
          RV1V4,          R,          ,           ,          p5V5Wº,          ,          V2V4,          WÊ,          ,          ,           Wº&   V V5R,
          V-,          V2V4,          V,          ,           ,          p VV3V4,          ,          pV,R8  d[   V4V0^,
          8X  dM   V*V,8:  d   \A        V(4      pVV,          VV&   RV
V&   V+V,8:  d    \A        V)4      pVV,          VV&   RV
V&   EKf  EKi   W›,          RV,          V! V4      ,          ,           V 8”  d   TpV'       dn   \        P                  ! W+8*  4      '       g   Q h\        P                  ! W³8*  4      '       g   Q h\        P*                  P-                  V4      R	V,          8  g   Q hV#   \0         d     EKv  i ; i)a˜  
Minimize approximately a quadratic function subject to bound constraints in
a trust region.

This function solves approximately

.. math::

    \min_{s \in \mathbb{R}^n} \quad g^{\mathsf{T}} s + \frac{1}{2}
    s^{\mathsf{T}} H s \quad \text{s.t.} \quad
    \left\{ \begin{array}{l}
        l \le s \le u\\
        \lVert s \rVert \le \Delta,
    \end{array} \right.

using an active-set variation of the truncated conjugate gradient method.

Parameters
----------
grad : `numpy.ndarray`, shape (n,)
    Gradient :math:`g` as shown above.
hess_prod : callable
    Product of the Hessian matrix :math:`H` with any vector.

        ``hess_prod(s) -> `numpy.ndarray`, shape (n,)``

    returns the product :math:`H s`.
xl : `numpy.ndarray`, shape (n,)
    Lower bounds :math:`l` as shown above.
xu : `numpy.ndarray`, shape (n,)
    Upper bounds :math:`u` as shown above.
delta : float
    Trust-region radius :math:`\Delta` as shown above.
debug : bool
    Whether to make debugging tests during the execution.

Returns
-------
`numpy.ndarray`, shape (n,)
    Approximate solution :math:`s`.

Other Parameters
----------------
improve_tcg : bool, optional
    If True, a solution generated by the truncated conjugate gradient
    method that is on the boundary of the trust region is improved by
    moving around the trust-region boundary on the two-dimensional space
    spanned by the solution and the gradient of the quadratic function at
    the solution (default is True).

Notes
-----
This function implements Algorithm 6.2 of [1]_. It is assumed that the
origin is feasible with respect to the bound constraints and that `delta`
is finite and positive.

References
----------
.. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
   and Software*. PhD thesis, Department of Applied Mathematics, The Hong
   Kong Polytechnic University, Hong Kong, China, 2022. URL:
   https://theses.lib.polyu.edu.hk/handle/200/12294.
ç        Fç      ð?ç:Œ0âŽyE>ç      à?TÚimprove_tcgç       @çš™™™™™ñ?ç      $Àç:Œ0âŽyE¾))Ú
isinstanceÚnpÚndarrayÚndimÚinspectÚ	signatureÚbindÚshapeÚfloatÚboolr   ÚallÚisfiniteÚminimumÚmaximumÚsizeÚcopyÚ
zeros_likeÚcount_nonzeroÚEPSÚmaxÚlinalgÚnormÚ	_alpha_trÚZeroDivisionErrorÚTINYÚabsÚinfÚminÚ	full_likeÚclipÚargminÚ_argminÚgetÚsqrtÚanyÚzerosÚonesÚintÚlinspaceÚargmax)6ÚgradÚ	hess_prodÚxlÚxuÚdeltaÚdebugÚkwargsÚtolÚnÚ	grad_origÚfree_bdÚstepÚsdÚkÚreductÚboundary_reachedÚgrad_sdÚalpha_trÚhess_sdÚcurv_sdÚ
alpha_quadÚalphaÚi_xlÚi_xuÚall_alpha_xlÚall_alpha_xuÚalpha_xlÚalpha_xuÚalpha_bdÚbetaÚi_newÚ	step_baseÚstep_comparatorÚstep_sqÚgrad_sqÚ	grad_stepÚtemp_xlÚtemp_xuÚdist_xlÚdist_xuÚall_t_xlÚall_t_xuÚt_xlÚt_xuÚt_bdÚ	hess_stepÚ	curv_stepÚcurv_step_sdÚ	n_samplesÚ	t_samplesÚ
sin_valuesÚ
all_reductÚi_maxÚ	cos_values6   &&&&&&,                                               Úh/home/luca/screen-checking/.venv/lib/python3.14/site-packages/scipy/_external/cobyqa/subsolvers/optim.pyÚtangential_byrd_omojokunrn      sd
  € ÷@ €uÜ˜$¤§
¡
×+Ò+°·	±	¸Q´Ð>Ð>Ü× Ò  Ó+×0Ñ0°×6Ò6Ð6Ð6Ü˜"œbŸj™j×)Ò)¨b¯h©h¸$¿*¹*Ô.DÐDÐDÜ˜"œbŸj™j×)Ò)¨b¯h©h¸$¿*¹*Ô.DÐDÐDÜ˜%¤×'Ò'Ð'Ð'Ü˜%¤×&Ò&Ð&Ð&Ü˜RÓ$ˆÜ�vŠv�b‘i× Ò Ð Ð Ü�vŠv�b˜D‘j×!Ò!Ð!Ð!Ü�{Š{˜5×!Ò! e¨c¤kÐ1Ð1Ü	�Š�B˜Ó	€BÜ	�Š�B˜Ó	€Bð 	�	‰	€AÜ�7Š7�4‹=€DÜ—’˜“€Ið �S‘˜T C™ZÕ(¨b°3©h¸4À#¹:Õ-FÕG€Gô �=Š=˜Ó€DÜ	�Š�tÓ	€BØ•=�.€B�Kà	€AØ€FØÐØ
Œb×Ò˜wÓ'Õ
'à•)ˆØ�eœc•k A•o¬¨C´·±·±ÀÓ1EÓ(FÕFÔFÙð	Ü  ¨5Ó1ˆHð ˆ9�wÕ $¨¥-Ô/Ùñ ˜B“-ˆØ�w•,ˆØ”TœC ›LÕ(Ô(Ü˜g˜X¨Õ/°Ó5‰JäŸ™ˆJô �H˜jÓ)ˆØˆ6�W˜s U�{¨WÕ4Õ4Õ5¸À½ÔFÙð ”b—f‘f�W‘ ¤t e¬b¯fªf°RµYÓ.?Õ&?Ñ!?Õ@ˆØ”R—V‘V‘ ¤T¬B¯FªF°2µ9Ó,=Õ%=Ñ =Õ>ˆÜ—|’| D¬"¯&©&Ó1ˆÜ—|’| D¬"¯&©&Ó1ˆÜŸZšZØ��X˜˜T�
Õ" b¨¥hÕ.Øó
ˆ�TÑô  ŸZšZØ��X˜˜T�
Õ" b¨¥hÕ.Øó
ˆ�TÑô —6’6˜,Ó'ˆÜ—6’6˜,Ó'ˆÜ�x Ó*ˆô �E˜8Ó$ˆØ�3Œ;ÜŸGšGØ• ¨­Õ 3Õ3Ø•Ø•óˆD‰Mð
 �E˜G•OÕ#ˆDØ�e˜w¨¨u­°wÕ)>Õ>Õ?Õ?ˆFà”3�x Ó*Ô*ð •M G¨GÕ$4Õ4¸Õ?ˆDØ ¥Õ,¨t­}Õ<ˆB‰KØˆBˆx‰LØ��F‹AØ�XÔð ˜5Ô ÜŸ	š	 ,Ó/�Ø  �i��U’äŸ	š	 ,Ó/�Ø  �i��U‘Ø"ˆG�E‰NØ�=˜.ˆB‰KØˆBˆx‰LØ‹Að
 ˜5Ô Ü Ó-�Ø  �i��U‘Ø!&�˜‘Ø˜5Ô Ü Ó-�Ø  �i��U‘Ø!&�˜‘Ø#ÐØð ‡z�z�- ×&Ó&×+;Ð+;Ü—G’G˜D“Mˆ	Ø# iÕ/°#¸	µ/ÁIØóE
õ 3
õ 
ˆô ×Ò˜wÓ'¨!Õ+ð •m d¥mÕ3ˆGØ•m d¥mÕ3ˆGØ�¨­Õ5ˆIÜ—w’wœs 7¨WÕ#4°yÀ#µ~Õ#EÀsÓKÓLÐLˆGØ# d¥mÕ3°gÀÅÕ6MÕMˆB‰KØˆBˆx‰LØ˜% &�.Ô(¬B¯FªFØœD˜5¤2§6¢6¨"­+Ó#6Õ6Ñ6÷-ò -ñ Ø�K˜G˜8Õ#‹Kô
 —h’h˜q“kˆGÜ—h’h˜q“kˆGà• Õ$ r¥{°cÕ'9Õ9¸B½KÈ3Õ<NÕNð �GÑð • Õ$ r¥{°cÕ'9Õ9¸B½KÈ3Õ<NÕNð �GÑô —’˜ ¨#¡Õ.Ó/°"°W¸s±]Õ2CÕCð �G˜c‘MÑ"ô —’˜ ¨#¡Õ.Ó/°"°W¸s±]Õ2CÕCð �G˜c‘MÑ"ô —j’j ¥¨CÓ0ˆGÜ—j’j ¥¨CÓ0ˆGØœT G�^Ñ+ˆDØœT G�^Ñ+ˆDÜ—w’w˜q“zˆHÜ—w’w˜q“zˆHÜŸZšZØ˜•Ø˜• ¨¥Õ-óˆH�T‰Nô  ŸZšZØ˜•Ø˜• ¨¥Õ-óˆH�T‰Nô —6’6˜(Ó#ˆDÜ—6’6˜(Ó#ˆDÜ�t˜T“?ˆDñ " $›ˆIÙ “mˆGØ˜yÕ(ˆIØ˜7•lˆGØ '�>ˆLð
 ˆIÜ˜Y¨�]¨dÕ2°QÕ6Ó7ˆIÜŸš D¨9Õ$4°d¸IÓFˆIØ˜y�¨C°)¸Sµ.Õ,@ÕAˆJØ#Ø˜IÕ%Øõà˜iÕ'õ(ð Ø˜|Õ+¨c°W¸yÕ5HÕ.IÕIõKõKõˆJô �vŠv�j CÑ'×(Ò(áô —I’I˜jÓ)ˆEØ˜y¨Õ/°3Õ6Õ6Ø�i Õ&¨#Õ-Õ-õˆIð ˜D�MÕ)¨J°uÕ,=ÀÅÕ,KÕKð ‰Mð �Y •_¨	Õ1°J¸uÕ4EÈÕ4OÕOÕOˆDØ�j Õ'Õ'ˆFð
 �cŒz˜e y°1¥}Ô4Ø˜4”<Ü# HÓ-�EØ"$ U¥)�D˜‘KØ%*�G˜E‘NØ˜4”<Ü# HÓ-�EØ"$ U¥)�D˜‘KØ%*�G˜E”Nò  ð
 ð Õ˜c D�j©9°T«?Õ:Õ:¸_ÔLØˆDçÜ�vŠv�b‘j×!Ò!Ð!Ð!Ü�vŠv�d‘j×!Ò!Ð!Ð!Ü�y‰y�~‰~˜dÓ# c¨E¥kÔ1Ð1Ð1Ø€KøôY !ô 	Ûð	ús   Ê9s+ ó+s;ó:s;c	                óV$  € V'       Edœ   \        V \        P                  4      '       d   V P                  ^8X  g   Q h\        P
                  ! V4      P                  V 4      '       g   Q h\        V\        P                  4      '       d   VP                  V P                  8X  g   Q h\        V\        P                  4      '       d   VP                  V P                  8X  g   Q h\        V\        P                  4      '       d4   VP                  ^8X  d#   VP                  ^,          V P                  8X  g   Q h\        V\        P                  4      '       d4   VP                  ^8X  d#   VP                  VP                  ^ ,          8X  g   Q h\        V\        P                  4      '       d4   VP                  ^8X  d#   VP                  ^,          V P                  8X  g   Q h\        V\        4      '       g   Q h\        V\        4      '       g   Q h\        W#4      p
\        P                  ! W*8*  4      '       g   Q h\        P                  ! W:) 8¬  4      '       g   Q h\        P                  ! WZ) 8¬  4      '       g   Q h\        P                  ! V4      '       d   VR8”  g   Q h\        P                  ! VR4      p\        P                  ! VR4      p\        P                  ! VR4      pV P                  p\        P                   ! V 4      p \        P                   ! V 4      pVR8  V R8  ,          pVR8„  V R8„  ,          pVR8„  W@,          R8„  ,          p\#        WFWÞV4      w  pp\        P$                  ! V 4      pVRVR13,          ) VRVR13,          P&                  V ,          ,          p\        P                   ! V4      p^ pRpRpVVV,
          8  Edg   V V,          pVR\(        ,          V,          \+        R\        P,                  P/                  V 4      4      ,          8¼  d   EM \1        VVV4      pT) T,          RT,          8:  d   EMîT! T4      pTT,          pT\4        \7        T4      ,          8”  d   \+        T) T,          R4      pM\        P8                  p\;        TT4      pT) TRT,          T,          ,           ,          RT,          8:  d   EMdYÒ\        P8                  ) 8„  ,          T\4        ) \        P6                  ! TT,
          4      ,          8  ,          pYã\        P8                  8  ,          T\4        \        P6                  ! TT,
          4      ,          8„  ,          p\        P<                  ! T\        P8                  4      p \        P<                  ! T\        P8                  4      p!\        P                  ! TT,          TT,          ,
          TT,          ,          R4      T T&   \        P                  ! TT,          TT,          ,
          TT,          ,          R4      T!T&   \        P:                  ! T 4      p"\        P:                  ! T!4      p#\;        T"T#4      p$TT,          p%TT%\4        \        P6                  ! T4      ,          8„  ,          p&\        P<                  ! T\        P8                  4      p'TT&,          T%T&,          ,          T'T&&   \        P:                  ! T'\        P8                  R7      p(\;        TT$T(4      pTR8”  d€   \        P>                  ! TTT,          ,           Y#4      pT TT,          ,          p \        P                  ! RTTT%,          ,
          4      pTTTRT,          T,          ,           ,          ,          pT\;        TT$T(4      8  d]   TRTR13,          TRTR13,          P&                  T ,          ,          p)T)T,          T,          p*T*T,          T),
          pT^,          pEK;  TT8  dÂ   T"T8:  d)   \        P@                  ! T 4      p+TT+,          TT+&   RTT+&   MJT#T8:  d)   \        P@                  ! T!4      p+TT+,          TT+&   RTT+&   M\        P@                  ! T'4      p+RTT+&   \#        TTTTT4      w  ppTRTR13,          ) TRTR13,          P&                  T ,          ,          p^ pEK  T"T8:  d   \C        T 4      p+TT+,          TT+&   RTT+&   T#T8:  d   \C        T!4      p+TT+,          TT+&   RTT+&   T(T8:  d   \C        T'4      p+RTT+&   \#        TTTTT4      w  ppR	p V	PE                  R
R	4      '       EdÕ   V'       EdÌ   VV8  EdÄ   \        P                   ! V4      p,VV8  EdY   VRVR13,          VRVR13,          P&                  V,          ,          p-VRVR13,          VRVR13,          P&                  V ,          ,          p)V-V-,          p.V)V),          p/V)V-,          p0\        PF                  ! \+        V.V/,          V0R,          ,
          R4      4      ) pVRVR13,          VRVR13,          P&                  V0V,          V.V ,          ,
          ,          ,          pVRV,          8¼  g@   \        PH                  ! V\4        ) \        P6                  ! V4      ,          8¬  4      '       d   EMVV) ,          p\        PJ                  ! V4      p1\        PJ                  ! V4      p2\        P                  ! VV,
          R4      p3\        P                  ! VV,
          R4      p4VV,          R,          V3V,          V3V,          RV-V,          ,          ,
          ,          ,
          V1V&   VV,          R,          V4V,          V4V,          RV-V,          ,          ,           ,          ,
          V2V&   \        PF                  ! V1V1R8„  ,          4      VV1R8„  ,          ,
          V1V1R8„  &   \        PF                  ! V2V2R8„  ,          4      VV2R8„  ,          ,           V2V2R8„  &   V1\4        V3,          8„  pV2\4        V4,          8„  p\        PL                  ! V4      p5\        PL                  ! V4      p6\        P                  ! V5V,          V3V,          V1V,          ,          4      V5V&   \        P                  ! V6V,          V4V,          V2V,          ,          4      V6V&   \        P:                  ! V54      p7\        P:                  ! V64      p8\;        V7V84      p9\        P$                  ! V4      p:VV-,          p;VV,          p%V%V,          R,          VV,          VV,          RV;V,          ,          ,           ,          ,
          V:V&   \        PF                  ! V:V:R8„  ,          4      V%V:R8„  ,          ,           V:V:R8„  &   V:\4        V,          8„  p&\        PN                  ! V4      p<\        P                  ! V<V&,          VV&,          V:V&,          ,          4      V<V&&   \        P:                  ! V<RR7      p=\;        V9V=4      p>V! V-4      p?V! V4      pV-V?,          p@VV,          pV-V,          pA^pB\Q        VB^,
          V>,          ^,           4      pB\        PR                  ! V>VB,          V>VB4      pCRVC,          RVCR,          ,           ,          pDVDV0VC,          V,
          VDRVCR,          ,          V@,          RVC,          VA,          ,
          RV,          ,           ,          ,
          ,          pE\        P                  ! VER8*  4      '       d   EM�\        PT                  ! XE4      pFRXCVF,          R,          ,
          RVCVF,          R,          ,           ,          pG\        P>                  ! VVGR,
          V-,          ,           XDVF,          V,          ,           VV4      pV VGR,
          V?,          VDVF,          V,          ,           ,          p \        P                  ! RVVGR,
          V;,          ,
          VDVF,          V%,          ,
          4      pVVEVF,          ,          pV>R8  d�   XFXB^,
          8X  ds   V7V>8:  d   \C        V54      p+VV+,          VV+&   RVV+&   V8V>8:  d   \C        V64      p+VV+,          VV+&   RVV+&   V=V>8:  d   \C        V<4      p+RVV+&   \#        VVVVV4      w  ppEK_   VV,          RV,          V! V4      ,          ,           VV,,          RV,,          V! V,4      ,          ,           8”  d   T,pV'       då   \        W#4      p
\        P                  ! VV8*  4      '       g   Q h\        P                  ! VV8*  4      '       g   Q h\        P                  ! VV,          WZ,           8*  4      '       g   Q h\        P                  ! \        P6                  ! VV,          4      V
8*  4      '       g   Q h\        P,                  P/                  V4      RV,          8  g   Q hV#   \2         d     EKê  i ; i)az	  
Minimize approximately a quadratic function subject to bound and linear
constraints in a trust region.

This function solves approximately

.. math::

    \min_{s \in \mathbb{R}^n} \quad g^{\mathsf{T}} s + \frac{1}{2}
    s^{\mathsf{T}} H s \quad \text{s.t.} \quad
    \left\{ \begin{array}{l}
        l \le s \le u,\\
        A_{\scriptscriptstyle I} s \le b_{\scriptscriptstyle I},\\
        A_{\scriptscriptstyle E} s = 0,\\
        \lVert s \rVert \le \Delta,
    \end{array} \right.

using an active-set variation of the truncated conjugate gradient method.

Parameters
----------
grad : `numpy.ndarray`, shape (n,)
    Gradient :math:`g` as shown above.
hess_prod : callable
    Product of the Hessian matrix :math:`H` with any vector.

        ``hess_prod(s) -> `numpy.ndarray`, shape (n,)``

    returns the product :math:`H s`.
xl : `numpy.ndarray`, shape (n,)
    Lower bounds :math:`l` as shown above.
xu : `numpy.ndarray`, shape (n,)
    Upper bounds :math:`u` as shown above.
aub : `numpy.ndarray`, shape (m_linear_ub, n)
    Coefficient matrix :math:`A_{\scriptscriptstyle I}` as shown above.
bub : `numpy.ndarray`, shape (m_linear_ub,)
    Right-hand side :math:`b_{\scriptscriptstyle I}` as shown above.
aeq : `numpy.ndarray`, shape (m_linear_eq, n)
    Coefficient matrix :math:`A_{\scriptscriptstyle E}` as shown above.
delta : float
    Trust-region radius :math:`\Delta` as shown above.
debug : bool
    Whether to make debugging tests during the execution.

Returns
-------
`numpy.ndarray`, shape (n,)
    Approximate solution :math:`s`.

Other Parameters
----------------
improve_tcg : bool, optional
    If True, a solution generated by the truncated conjugate gradient
    method that is on the boundary of the trust region is improved by
    moving around the trust-region boundary on the two-dimensional space
    spanned by the solution and the gradient of the quadratic function at
    the solution (default is True).

Notes
-----
This function implements Algorithm 6.3 of [1]_. It is assumed that the
origin is feasible with respect to the bound and linear constraints, and
that `delta` is finite and positive.

References
----------
.. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
   and Software*. PhD thesis, Department of Applied Mathematics, The Hong
   Kong Polytechnic University, Hong Kong, China, 2022. URL:
   https://theses.lib.polyu.edu.hk/handle/200/12294.
r   ºNNNNFr   r   r	   ©ÚinitialTr
   r   r   r   r   )+r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Úqr_tangential_byrd_omojokunr   ÚTr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   Ú	ones_liker4   r5   r6   )Hr7   r8   r9   r:   ÚaubÚbubÚaeqr;   r<   r=   r>   r?   r@   Úfree_xlÚfree_xuÚfree_ubÚn_actÚqrB   rC   ÚresidrD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   Úaub_sdÚi_ubÚall_alpha_ubÚalpha_ubÚ	grad_projrT   rU   rV   Ú	step_projrX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   Útemp_ubÚaub_stepÚall_t_ubÚt_ubÚt_minrd   re   rf   rg   rh   ri   rj   rk   rl   sH   &&&&&&&&&,                                                              rm   Ú$constrained_tangential_byrd_omojokunrŠ   C  sÜ  € ÷f €uÜ˜$¤§
¡
×+Ò+°·	±	¸Q´Ð>Ð>Ü× Ò  Ó+×0Ñ0°×6Ò6Ð6Ð6Ü˜"œbŸj™j×)Ò)¨b¯h©h¸$¿*¹*Ô.DÐDÐDÜ˜"œbŸj™j×)Ò)¨b¯h©h¸$¿*¹*Ô.DÐDÐDä�sœBŸJ™J×'Ò'Ø—‘˜A”Ø—	‘	˜!• §	¡	Ô)ð	
ð*ô
 �sœBŸJ™J×'Ò'Ø—‘˜A”Ø—‘˜CŸI™I a�LÔ(ð	
ð)ô
 �sœBŸJ™J×'Ò'Ø—‘˜A”Ø—	‘	˜!• §	¡	Ô)ð	
ð*ô ˜%¤×'Ò'Ð'Ð'Ü˜%¤×&Ò&Ð&Ð&Ü˜RÓ$ˆÜ�vŠv�b‘i× Ò Ð Ð Ü�vŠv�b˜D‘j×!Ò!Ð!Ð!Ü�vŠv�c˜T‘k×"Ò"Ð"Ð"Ü�{Š{˜5×!Ò! e¨c¤kÐ1Ð1Ü	�Š�B˜Ó	€BÜ	�Š�B˜Ó	€BÜ
�*Š*�S˜#Ó
€Cð 	�	‰	€AÜ�7Š7�4‹=€DÜ—’˜“€Ið �C‰x˜D 3™JÕ'€GØ�C‰x˜D 3™JÕ'€GØ�S‰y˜S�Z¨#Ñ-Õ.€GÜ*¨3°WÀwÓO�H€Eˆ1ô �=Š=˜Ó€DØ
ˆAˆu‰vˆI�,ˆ˜!˜A˜u™v˜I�,Ÿ.™.¨4Õ/Õ	0€BÜ�GŠG�C‹L€Eà	€AØ€FØÐØ
ˆa�%�i�-à˜•)ˆØ�eœc•k A•o¬¨C´·±·±ÀÓ1EÓ(FÕFÔFÙð	Ü   r¨5Ó1ˆHð ˆ9�wÕ $¨¥-Ô/Ùñ ˜B“-ˆØ�w•,ˆØ”TœC ›LÕ(Ô(Ü˜g˜X¨Õ/°Ó5‰JäŸ™ˆJô �H˜jÓ)ˆØˆ6�W˜s U�{¨WÕ4Õ4Õ5¸À½ÔFÙð ¤§¡˜w™,Õ'¨2´°¼¿º¸rÀD½yÓ8IÕ0IÑ+IÕJˆØœrŸv™v™+Õ&¨"¬t´b·f²f¸RÀ$½YÓ6GÕ/GÑ*GÕHˆÜ—|’| D¬"¯&©&Ó1ˆÜ—|’| D¬"¯&©&Ó1ˆÜŸZšZØ��X˜˜T�
Õ" b¨¥hÕ.Øó
ˆ�TÑô  ŸZšZØ��X˜˜T�
Õ" b¨¥hÕ.Øó
ˆ�TÑô —6’6˜,Ó'ˆÜ—6’6˜,Ó'ˆÜ�x Ó*ˆð �r•ˆØ˜&¤4¬"¯&ª&°«-Õ#7Ñ7Õ8ˆÜ—|’| C¬¯©Ó0ˆØ" 4�[¨6°$­<Õ7ˆ�TÑÜ—6’6˜,´·±Ô7ˆô �E˜8 XÓ.ˆØ�3Œ;Ü—7’7˜4 %¨"¥*Õ,¨bÓ5ˆDØ�E˜G•OÕ#ˆDÜ—J’J˜s E¨E°F­NÕ$:Ó;ˆEØ�e˜w¨¨u­°wÕ)>Õ>Õ?Õ?ˆFà”3�x ¨8Ó4Ô4ð ˜!˜U™V˜)�¨¨!¨U©V¨)­¯©¸Õ(=Õ>ˆIØ Õ'¨7Õ2ˆDØ˜•˜YÕ&ˆBØ��F‹AØ�XÔð ˜5Ô ÜŸ	š	 ,Ó/�Ø  �i��U‘Ø!&�˜’Ø˜UÔ"ÜŸ	š	 ,Ó/�Ø  �i��U‘Ø!&�˜’äŸ	š	 ,Ó/�Ø!&�˜‘Ü2ØØØØØó‰HˆE�1ð �A�u‘v�I•,� ! A u¡v I¥,§.¡.°4Õ"7Õ8ˆBØ‹Að
 ˜5Ô Ü Ó-�Ø  �i��U‘Ø!&�˜‘Ø˜5Ô Ü Ó-�Ø  �i��U‘Ø!&�˜‘Ø˜5Ô Ü Ó-�Ø!&�˜‘Ü2ØØØØØó‰HˆE�1ð  $ÐØð ‡z�z�- ×&Ó&×+;Ð+;ÀÈÅ	Ü—G’G˜D“Mˆ	Ø�a�ið ˜!˜U™V˜)�¨¨!¨U©V¨)­¯©¸Õ(=Õ>ˆIØ˜!˜U™V˜)�¨¨!¨U©V¨)­¯©¸Õ(=Õ>ˆIØ )Õ+ˆGØ )Õ+ˆGØ! IÕ-ˆIÜ—w’wœs 7¨WÕ#4°yÀ#µ~Õ#EÀsÓKÓLÐLˆGØ�1�e‘f�9•Ø�!�U‘V�)•—‘ )¨dÕ"2°W¸tµ^Õ"CÕDõˆBð ˜% &�.Ô(¬B¯FªFØœD˜5¤2§6¢6¨"£:Õ-Ñ-÷-ò -ñ Ø�7�(�NˆBô —h’h˜q“kˆGÜ—h’h˜q“kˆGÜ—j’j ¨¥¨CÓ0ˆGÜ—j’j  d¥¨CÓ0ˆGØ! '�{¨cÕ1°G¸GÕ4DØ˜Õ  3¨°7Õ);Õ#;Õ;õ5õ  ˆG�GÑð  " '�{¨cÕ1°G¸GÕ4DØ˜Õ  3¨°7Õ);Õ#;Õ;õ5õ  ˆG�GÑô —’˜ ¨#¡Õ.Ó/°"°W¸s±]Õ2CÕCð �G˜c‘MÑ"ô —’˜ ¨#¡Õ.Ó/°"°W¸s±]Õ2CÕCð �G˜c‘MÑ"ð œT G�^Ñ+ˆDØœT G�^Ñ+ˆDÜ—w’w˜q“zˆHÜ—w’w˜q“zˆHÜŸZšZØ˜•Ø˜• ¨¥Õ-óˆH�T‰Nô  ŸZšZØ˜•Ø˜• ¨¥Õ-óˆH�T‰Nô —6’6˜(Ó#ˆDÜ—6’6˜(Ó#ˆDÜ�t˜T“?ˆDô —m’m EÓ*ˆGØ˜Y•ˆHØ˜2•XˆFØ% g�°#Õ5¸¸g½Ø�g•  x°Õ'8Õ!8Õ8õ9õ  ˆG�GÑô —’˜ ¨#¡Õ.Ó/°&¸À3¹Õ2GÕGð �G˜c‘MÑ"ð œT E�\Ñ)ˆDÜ—|’| EÓ*ˆHÜŸZšZØ˜•Ø�d•˜g d�mÕ+óˆH�T‰Nô —6’6˜(¨CÔ0ˆDÜ˜˜d“OˆEñ " )Ó,ˆIÙ “mˆGØ! IÕ-ˆIØ˜7•lˆGØ$ wÕ.ˆLð
 ˆIÜ˜Y¨�]¨eÕ3°aÕ7Ó8ˆIÜŸš E¨IÕ$5°u¸iÓHˆIØ˜y�¨C°)¸Sµ.Õ,@ÕAˆJØ#Ø˜IÕ%Øõàà˜) S�.Õ(¨9Õ4Ø˜I•o¨Õ4õ5à˜G•mõ$õõõ	ˆJô �vŠv�j CÑ'×(Ò(áô —I’I˜jÓ)ˆEØ˜y¨Õ/°3Õ6Õ6Ø�i Õ&¨#Õ-Õ-õˆIô —7’7Ø˜	 C�¨9Õ4Õ4°zÀ%Õ7HÈ2Õ7MÕMØØóˆDð
 �Y •_¨	Õ1°J¸uÕ4EÈÕ4OÕOÕOˆDÜ—J’JØØØ˜s•? hÕ.õ/à˜UÕ# fÕ,õ-óˆEð �j Õ'Õ'ˆFð
 �sŒ{˜u¨	°A­Ô5Ø˜5”=Ü# HÓ-�EØ"$ U¥)�D˜‘KØ%*�G˜E‘NØ˜5”=Ü# HÓ-�EØ"$ U¥)�D˜‘KØ%*�G˜E‘NØ˜5”=Ü# HÓ-�EØ%*�G˜E‘NÜ6ØØØØØó‘�“qð ð �tÕ˜c D�j©9Øó,
õ 
õ 
à˜	Õ! C¨)¥O±iÀ	Ó6JÕ$JÕJôKð ˆDçÜ˜RÓ$ˆÜ�vŠv�b˜D‘j×!Ò!Ð!Ð!Ü�vŠv�d˜b‘j×!Ò!Ð!Ð!Ü�vŠv�c˜D•j C¥IÑ-×.Ò.Ð.Ð.Ü�vŠv”b—f’f˜S 4�ZÓ(¨CÑ/×0Ò0Ð0Ð0Ü�y‰y�~‰~˜dÓ# c¨E¥kÔ1Ð1Ð1Ø€Køôe !ô 	Ûð	ús   Ð*AH ÁHAH(ÁH'AH(c           	     óÒ%  € V'       Ede   \        V \        P                  4      '       d   V P                  ^8X  g   Q h\        V\        P                  4      '       d4   VP                  ^8X  d#   VP                  V P
                  ^ ,          8X  g   Q h\        V\        P                  4      '       d;   VP                  ^8X  d*   VP
                  ^,          V P
                  ^,          8X  g   Q h\        V\        P                  4      '       d4   VP                  ^8X  d#   VP                  VP
                  ^ ,          8X  g   Q h\        V\        P                  4      '       d$   VP
                  V P
                  ^,          38X  g   Q h\        V\        P                  4      '       d$   VP
                  V P
                  ^,          38X  g   Q h\        V\        4      '       g   Q h\        V\        4      '       g   Q h\        WE4      p	\        P                  ! WI8*  4      '       g   Q h\        P                  ! WY) 8¬  4      '       g   Q h\        P                  ! V4      '       d   VR8”  g   Q h\        P                  ! VR4      p\        P                  ! VR4      pV P
                  w  r«\        P                  VP                  V) ,          \        P                  ! RV) 4      3,          pVR8  VRV R8  ,          pVR8„  VRV R8„  ,          pVR8  pVR8„  WRV ,          WËR ,
          R8„  ,          p\        V VVVV4      w  pp\        P                   ! W3,          WËR WËR ,          ,           4      p\        P"                  ! V4      pVRVR13,          ) VRVR13,          P                  V,          ,          pWVR ,           p^ pRpRpVWº,           V,
          8  Ed|   VV,          pVR\$        ,          V,          \'        R\        P(                  P+                  V4      4      ,          8¼  d   EM) \-        VVRV V4      p \3        V\-        WËR VVR V4      4      pV) V,          RV,          8:  d   EMã\        P                  VP                  VVRV ,          ,          VVR 3,          pVV,          pV\4        \7        V4      ,          8”  d   \'        V) V,          R4      pM\        P0                  p\3        VV4      pV) VRV,          V,          ,           ,          RV,          8:  d   EM*WÔ\        P0                  ) 8„  ,          VRV \4        ) \        P6                  ! VV,
          4      ,          8  ,          p Wå\        P0                  8  ,          VRV \4        \        P6                  ! VV,
          4      ,          8„  ,          p!VVVR \4        ) \        P6                  ! WËR 4      ,          8  ,          p"\        P8                  ! V\        P0                  4      p#\        P8                  ! V\        P0                  4      p$\        P8                  ! V\        P0                  4      p%\        P                  ! VV ,          VV ,          ,
          VRV V ,          ,          R4      V#V &   \        P                  ! VV!,          VV!,          ,
          VRV V!,          ,          R4      V$V!&   \        P                  ! WËR V",          ) VVR V",          ,          R4      V%V"&   \        P2                  ! V#4      p&\        P2                  ! V$4      p'\        P2                  ! V%\        P0                  R7      p(\3        V&V'V(4      p)V VRV ,          VVR ,
          p*VV*\4        \        P6                  ! V4      ,          8„  ,          p+\        P8                  ! V\        P0                  4      p,VV+,          V*V+,          ,          V,V+&   \        P2                  ! V,\        P0                  R7      p-\3        VV)V-4      pVR8”  dƒ   \        P:                  ! VVVRV ,          ,           WE4      pVVV,          ,          p\        P                  ! RVVV*,          ,
          4      pVVVRV,          V,          ,           ,          ,          pV\3        VV)V-4      8  d]   VRVR13,          VRVR13,          P                  V,          ,          p.V.V,          V,          p/V/V,          V.,
          pV^,          pEK^  VV8  dã   V&V8:  d)   \        P<                  ! V#4      p0VV0,          VV0&   RVV0&   MmV'V8:  d)   \        P<                  ! V$4      p0VV0,          VV0&   RVV0&   M>V(V8:  d   \        P<                  ! V%4      p0RVV0&   M\        P<                  ! V,4      p0RVV0&   \        WWïV4      w  ppVRVR13,          ) VRVR13,          P                  V,          ,          p^ pEKG  V&V8:  d   \?        V#4      p0VV0,          VV0&   RVV0&   V'V8:  d   \?        V$4      p0VV0,          VV0&   RVV0&   R	p VPA                  R
R	4      '       EdÇ   V'       Ed¾   \        PB                  ! V4      p1WÞ,          p2V P                  \        P                  ! V V,          V,
          R4      ,          VP                  VV,          V,
          ,          ,           p\        P"                  ! V4      p\        PD                  ! V24      ^ 8”  Edu   VV2,          VV2,          ,          p3VV2,          VV2,          ,          p4VV2,          VV2,          ,          p5\        P                   ! \'        V3V4,          V5R,          ,
          R4      4      ) pV5VV2,          ,          V3VV2,          ,          ,
          VV2&   RVV2( &   VRV,          8¼  gG   \        PF                  ! V\4        ) \        P6                  ! VV2,          4      ,          8¬  4      '       d   EMuVV2;;,          V) ,          uu&   \        P"                  ! V4      p6\        P"                  ! V4      p7VV2,          R,          VV2,          R,          ,           VV2,          R,          ,
          V6V2&   VV2,          R,          VV2,          R,          ,           VV2,          R,          ,
          V7V2&   \        P                   ! V6V6R8„  ,          4      VV6R8„  ,          ,
          V6V6R8„  &   \        P                   ! V7V7R8„  ,          4      VV7R8„  ,          ,           V7V7R8„  &   \        P                  ! VV,
          R4      p8\        P                  ! VV,
          R4      p9V6\4        V8,          8„  p V7\4        V9,          8„  p!\        PH                  ! V4      p:\        PH                  ! V4      p;\        P                  ! V:V ,          V8V ,          V6V ,          ,          4      V:V &   \        P                  ! V;V!,          V9V!,          V7V!,          ,          4      V;V!&   \        P2                  ! V:4      p<\        P2                  ! V;4      p=\3        V<V=4      p>^p?\K        V?^,
          V>,          ^,           4      p?\        PL                  ! V>V?,          V>V?4      p@\        P                  ! V V,          V,
          R4      pAVV,          V,
          pB\        PB                  ! V4      pCRVCV2( &   \        PN                  ! V?4      pD\Q        V?4       FÜ  pERX@VE,          ,          RV@VE,          R,          ,           ,          pF\        P:                  ! VVFVV@VE,          XC,          ,
          ,          ,           VV4      pG\        P                  ! V VG,          V,
          R4      pHVVG,          V,
          pIRXAVA,          XBVB,          ,           VHVH,          ,
          VIVI,          ,
          ,          XDVE&   KÞ  	  \        P                  ! XDR8*  4      '       d   EMk\        PR                  ! XD4      pJRX@VJ,          R,          ,
          RV@VJ,          R,          ,           ,          pKRV@VJ,          ,          RV@VJ,          R,          ,           ,          pFVKVV2,          ,          VFVV2,          ,          ,           VV2&   V P                  \        P                  ! V V,          V,
          R4      ,          VP                  VV,          V,
          ,          ,           pVVDVJ,          ,          pV>R8  d[   XJV?^,
          8X  dM   V<V>8:  d   \?        V:4      p0VV0,          VV0&   RV2V0&   V=V>8:  d    \?        V;4      p0VV0,          VV0&   RV2V0&   EKŒ  EK�   \        P                  ! V V,          V,
          R4      pA\        P                  ! V V1,          V,
          R4      pLVV,          V,
          pBVV1,          V,
          pMVAVA,          VBVB,          ,           VLVL,          VMVM,          ,           8”  d   T1pV'       dp   \        P                  ! VV8*  4      '       g   Q h\        P                  ! VV8*  4      '       g   Q h\        P(                  P+                  V4      RV,          8  g   Q hV#   \.         d    \        P0                  p ELŽi ; i  \.         d     ELƒi ; i)aÍ  
Minimize approximately a linear constraint violation subject to bound
constraints in a trust region.

This function solves approximately

.. math::

    \min_{s \in \mathbb{R}^n} \quad \frac{1}{2} \big( \lVert \max \{
    A_{\scriptscriptstyle I} s - b_{\scriptscriptstyle I}, 0 \} \rVert^2 +
    \lVert A_{\scriptscriptstyle E} s - b_{\scriptscriptstyle E} \rVert^2
    \big) \quad \text{s.t.}
    \quad
    \left\{ \begin{array}{l}
        l \le s \le u,\\
        \lVert s \rVert \le \Delta,
    \end{array} \right.

using a variation of the truncated conjugate gradient method.

Parameters
----------
aub : `numpy.ndarray`, shape (m_linear_ub, n)
    Matrix :math:`A_{\scriptscriptstyle I}` as shown above.
bub : `numpy.ndarray`, shape (m_linear_ub,)
    Vector :math:`b_{\scriptscriptstyle I}` as shown above.
aeq : `numpy.ndarray`, shape (m_linear_eq, n)
    Matrix :math:`A_{\scriptscriptstyle E}` as shown above.
beq : `numpy.ndarray`, shape (m_linear_eq,)
    Vector :math:`b_{\scriptscriptstyle E}` as shown above.
xl : `numpy.ndarray`, shape (n,)
    Lower bounds :math:`l` as shown above.
xu : `numpy.ndarray`, shape (n,)
    Upper bounds :math:`u` as shown above.
delta : float
    Trust-region radius :math:`\Delta` as shown above.
debug : bool
    Whether to make debugging tests during the execution.

Returns
-------
`numpy.ndarray`, shape (n,)
    Approximate solution :math:`s`.

Other Parameters
----------------
improve_tcg : bool, optional
    If True, a solution generated by the truncated conjugate gradient
    method that is on the boundary of the trust region is improved by
    moving around the trust-region boundary on the two-dimensional space
    spanned by the solution and the gradient of the quadratic function at
    the solution (default is True).

Notes
-----
This function implements Algorithm 6.4 of [1]_. It is assumed that the
origin is feasible with respect to the bound constraints and that `delta`
is finite and positive.

References
----------
.. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
   and Software*. PhD thesis, Department of Applied Mathematics, The Hong
   Kong Polytechnic University, Hong Kong, China, 2022. URL:
   https://theses.lib.polyu.edu.hk/handle/200/12294.
r   Nrp   Fr   r   r	   rq   Tr
   r   r   r   r   )*r   r   r   r   r   r   r   r   r   r   r   r   r   Úr_rt   Úqr_normal_byrd_omojokunr0   r2   r!   r"   r#   r$   r%   r&   r)   r*   r'   r(   r+   r,   r-   r.   r/   r   r    r1   r3   r4   r5   ÚemptyÚranger6   )Nrv   rw   rx   Úbeqr9   r:   r;   r<   r=   r>   Úm_linear_ubr?   r7   ry   rz   Ú
free_slackr{   r|   r}   Údelta_slackrB   rC   r~   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   Úi_slackrO   rP   Úall_alpha_slackrQ   rR   Úalpha_slackrS   r   r€   r�   r‚   rƒ   rT   rU   rV   rA   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rg   rh   Úresid_ubÚresid_eqr„   rj   ÚiÚ	sin_valueÚstep_altÚresid_ub_altÚresid_eq_altrk   rl   Úresid_ub_baseÚresid_eq_basesN   &&&&&&&&,                                                                     rm   Únormal_byrd_omojokunr    æ  s>  € ÷F €uÜ˜#œrŸz™z×*Ò*¨s¯x©x¸1¬}Ð<Ð<ä�sœBŸJ™J×'Ò'Ø—‘˜A”Ø—‘˜CŸI™I a�LÔ(ð	
ð)ô
 �sœBŸJ™J×'Ò'Ø—‘˜A”Ø—	‘	˜!• §	¡	¨!¥Ô,ð	
ð-ô
 �sœBŸJ™J×'Ò'Ø—‘˜A”Ø—‘˜CŸI™I a�LÔ(ð	
ð)ô ˜"œbŸj™j×)Ò)¨b¯h©h¸3¿9¹9ÀQ½<¸/Ô.IÐIÐIÜ˜"œbŸj™j×)Ò)¨b¯h©h¸3¿9¹9ÀQ½<¸/Ô.IÐIÐIÜ˜%¤×'Ò'Ð'Ð'Ü˜%¤×&Ò&Ð&Ð&Ü˜RÓ$ˆÜ�vŠv�b‘i× Ò Ð Ð Ü�vŠv�b˜D‘j×!Ò!Ð!Ð!Ü�{Š{˜5×!Ò! e¨c¤kÐ1Ð1Ü	�Š�B˜Ó	€BÜ	�Š�B˜Ó	€Bð —Y‘Y�N€KÜ�5‰5�—‘˜#˜•œrŸzšz¨#°¨tÓ4Ð4Õ5€DØ�C‰x˜D  !˜H s™NÕ+€GØ�C‰x˜D  !˜H s™NÕ+€GØ�s‘€JØ�S‰y˜S¨¨ 8�^¨d°2¨hÕ6¸Ñ<Õ=€GÜ&ØØØØØó�H€Eˆ1ô —'’'˜#�) d¨2 h°°b°Õ&9Õ9Ó:€Kô �8Š8�A‹;€DØ
ˆAˆu‰vˆI�,ˆ˜!˜A˜u™v˜I�,Ÿ.™.¨4Õ/Õ	0€BØ�q�r�(�N€Eà	€AØ€FØÐØ
ˆa�o Õ%Õ
%à˜•)ˆØ�eœc•k A•o¬¨C´·±·±ÀÓ1EÓ(FÕFÔFÙð	Ü   r¨"¨1 v¨uÓ5ˆHð	Ü˜8¤Y¨t°B¨x¸¸A¸B¸ÀÓ%MÓNˆHð ˆ9�wÕ $¨¥-Ô/Ùô —%‘%˜Ÿ™  r¨"¨1 v¥Õ.°°1°2°Ð6Õ7ˆØ�w•,ˆØ”TœC ›LÕ(Ô(Ü˜g˜X¨Õ/°Ó5‰JäŸ™ˆJô �H˜jÓ)ˆØˆ6�W˜s U�{¨WÕ4Õ4Õ5¸À½ÔFÙð ¤§¡˜w™,Õ'¨2¨b¨q¨6´T°E¼B¿FºFÀ2ÈÅ9Ó<MÕ4MÑ+MÕNˆØœrŸv™v™+Õ&¨"¨R¨a¨&´4¼"¿&º&ÀÀdÅÓ:KÕ3KÑ*KÕLˆØ  1 2 ¬$¨´·²¸¸R¸Ó1AÕ)AÑ AÕBˆÜ—|’| D¬"¯&©&Ó1ˆÜ—|’| D¬"¯&©&Ó1ˆÜŸ,š, s¬B¯F©FÓ3ˆÜŸZšZØ��X˜˜T�
Õ" b¨¨! f¨T¥lÕ2Øó
ˆ�TÑô  ŸZšZØ��X˜˜T�
Õ" b¨¨! f¨T¥lÕ2Øó
ˆ�TÑô $&§:¢:Ø�"ˆX�gÕÐ  A B ¨¥Õ0Øó$
ˆ˜Ñ ô —6’6˜,Ó'ˆÜ—6’6˜,Ó'ˆÜ—f’f˜_´b·f±fÔ=ˆÜ�x ¨;Ó7ˆð �r˜"˜1�v•  1 2 Õ&ˆØ˜&¤4¬"¯&ª&°«-Õ#7Ñ7Õ8ˆÜ—|’| C¬¯©Ó0ˆØ" 4�[¨6°$­<Õ7ˆ�TÑÜ—6’6˜,´·±Ô7ˆô �E˜8 XÓ.ˆØ�3Œ;Ü—7’7˜4 %¨"¨R¨a¨&¥.Õ0°"Ó9ˆDØ�E˜G•OÕ#ˆDÜ—J’J˜s E¨E°F­NÕ$:Ó;ˆEØ�e˜w¨¨u­°wÕ)>Õ>Õ?Õ?ˆFà”3�x ¨8Ó4Ô4ð ˜!˜U™V˜)�¨¨!¨U©V¨)­¯©¸Õ(=Õ>ˆIØ Õ'¨7Õ2ˆDØ˜•˜YÕ&ˆBØ��F‹AØ�XÔð ˜5Ô ÜŸ	š	 ,Ó/�Ø  �i��U‘Ø!&�˜’Ø˜UÔ"ÜŸ	š	 ,Ó/�Ø  �i��U‘Ø!&�˜’Ø Ô%ÜŸ	š	 /Ó2�Ø$)�
˜5Ò!äŸ	š	 ,Ó/�Ø!&�˜‘Ü.Ø˜g°7ó‰HˆE�1ð �A�u‘v�I•,� ! A u¡v I¥,§.¡.°4Õ"7Õ8ˆBØ‹Að
 ˜5Ô Ü Ó-�Ø  �i��U‘Ø!&�˜‘Ø˜5Ô Ü Ó-�Ø  �i��U‘Ø!&�˜‘Ø#ÐØð ‡z�z�- ×&Ó&×+;Ð+;Ü—G’G˜D“Mˆ	ØÕ#ˆØ�u‰u”r—z’z #¨¥*¨sÕ"2°CÓ8Õ8¸3¿5¹5Ø�$�J˜Õõ<
õ 
ˆô �XŠX�a‹[ˆÜ×Ò˜wÓ'¨!Õ+ð ˜7•m d¨7¥mÕ3ˆGØ˜7•m d¨7¥mÕ3ˆGØ˜W�¨¨W­Õ5ˆIÜ—w’wœs 7¨WÕ#4°yÀ#µ~Õ#EÀsÓKÓLÐLˆGØ# d¨7¥mÕ3°gÀÀWÅÕ6MÕMˆBˆw‰KØˆB�ˆx‰LØ˜% &�.Ô(¬B¯FªFØœD˜5¤2§6¢6¨"¨W­+Ó#6Õ6Ñ6÷-ò -ñ Øˆw�K˜G˜8Õ#‹Kô
 —h’h˜q“kˆGÜ—h’h˜q“kˆGà�W• Õ$ r¨'¥{°cÕ'9Õ9¸B¸w½KÈ3Õ<NÕNð �GÑð �W• Õ$ r¨'¥{°cÕ'9Õ9¸B¸w½KÈ3Õ<NÕNð �GÑô —’˜ ¨#¡Õ.Ó/°"°W¸s±]Õ2CÕCð �G˜c‘MÑ"ô —’˜ ¨#¡Õ.Ó/°"°W¸s±]Õ2CÕCð �G˜c‘MÑ"ô —j’j ¨¥¨CÓ0ˆGÜ—j’j  d¥¨CÓ0ˆGØœT G�^Ñ+ˆDØœT G�^Ñ+ˆDÜ—w’w˜q“zˆHÜ—w’w˜q“zˆHÜŸZšZØ˜•Ø˜• ¨¥Õ-óˆH�T‰Nô  ŸZšZØ˜•Ø˜• ¨¥Õ-óˆH�T‰Nô —6’6˜(Ó#ˆDÜ—6’6˜(Ó#ˆDÜ�t˜T“?ˆDð
 ˆIÜ˜Y¨�]¨dÕ2°QÕ6Ó7ˆIÜŸš D¨9Õ$4°d¸IÓFˆIÜ—z’z #¨¥*¨sÕ"2°CÓ8ˆHØ˜T•z CÕ'ˆHÜŸš ›ˆIØ"%ˆI�w�hÑÜŸš )Ó,ˆJÜ˜9Ö%�Ø )¨A¥,Õ.°#¸	À!½ÈÕ8KÕ2KÕL�	ÜŸ7š7Ø˜9¨¨Y°q­\¸IÕ-EÕ(EÕFÕFØØó�ô
  "Ÿzšz¨#°­.¸3Õ*>ÀÓD�Ø" X�~°Õ3�Ø #Ø˜xÕ'Ø Õ)õ*à" \Õ1õ2ð # \Õ1õ2õ!�
˜1“ñ &ô �vŠv�j CÑ'×(Ò(áô —I’I˜jÓ)ˆEØ˜y¨Õ/°3Õ6Õ6Ø�i Õ&¨#Õ-Õ-õˆIð ˜y¨Õ/Õ/Ø )¨EÕ"2°cÕ"9Õ9õ;ˆIà%¨¨W­Õ5¸	ÀBÀwÅKÕ8OÕOˆD�‰MØ—5‘5œ2Ÿ:š: c¨D¥j°3Õ&6¸Ó<Õ<¸s¿u¹uØ�d•
˜SÕ õ@õ ˆDð �j Õ'Õ'ˆFð
 �cŒz˜e y°1¥}Ô4Ø˜4”<Ü# HÓ-�EØ"$ U¥)�D˜‘KØ%*�G˜E‘NØ˜4”<Ü# HÓ-�EØ"$ U¥)�D˜‘KØ%*�G˜E”Nò  ð
 ô —:’:˜c D�j¨3Õ.°Ó4ˆÜŸ
š
 3¨¥?°SÕ#8¸#Ó>ˆØ˜•: Õ#ˆØ˜i�¨#Õ-ˆà�xÕ (¨XÕ"5Õ5Ø˜mÕ+¨m¸mÕ.KÕKôLð ˆDçÜ�vŠv�b˜D‘j×!Ò!Ð!Ð!Ü�vŠv�d˜b‘j×!Ò!Ð!Ð!Ü�y‰y�~‰~˜dÓ# c¨E¥kÔ1Ð1Ð1Ø€Køôm !ô 	Ü—v‘v‹Hð	ûô !ô 	Úð	ús.   Ð5AJ5 ÑAK ÁJ5AKÁKAKÁKAK&ÁK%AK&c                 ót  € VP                   p\        P                  ! V4      p\        \        P                  ! V.W( R 3,          .Wb( R 3,          ) .Wc( R 3,          ..4      P
                  RR7      w  rxp	\        P                  ! \        P                  ! \        P                  ! V4      4      R\        ,          V,          \        P                  P                  VR\        P                  ! VP                  4      1R\        P                  ! VP                  4      13,          ^ R7      ,          8¬  4      p
W§3# ©rp   T)Úpivotingg      $@N)Úaxis)r   r   Úeyer   Úblockrt   r    r(   Údiagr!   r#   r$   r*   r   )rv   rx   ry   rz   r{   r?   Úidentityr}   ÚrÚ_r|   s   &&&&&      rm   rs   rs   c  s  € Ø�‰€AÜ�vŠv�a‹y€HÜÜ
�Šà�Ø�X˜q�[Õ!Ð"Ø˜8 Q˜;Õ'Ð'Ð(Ø˜( A˜+Õ&Ð'ð	ó	
÷ ‰!Øô
�G€Aˆ!ô ×ÒÜ
�ŠŒr�wŠw�q‹zÓØÜ
õà
õô �)‰)�.‰.˜Ð,œRŸVšV A§G¡G›_Ð,Ð.?´·²°q·w±w³Ð.?Ð?Õ@Àqˆ.Ó
IõJñ	Jó€Eð ˆ8€Oó    c                 ó  € V P                   w  rV\        P                  ! V4      p\        P                  ! V4      p\        \        P                  ! W( R 3,          W„( R 3,          ) .\        P
                  ! V\        P                  ! V4      ,
          V34      Wƒ( R 3,          ) .Wq( R 3,          ) \        P
                  ! V\        P                  ! V4      ,
          V34      .Wr( R 3,          \        P
                  ! V\        P                  ! V4      ,
          V34      ..4      P                  RR7      w  ršp\        P                  ! \        P                  ! \        P                  ! V
4      4      R\        ,          We,           ,          \        P                  P                  V
R\        P                  ! V
P                   4      1R\        P                  ! V
P                   4      13,          ^ R7      ,          8¬  4      pWÉ3# r¢   )r   r   r¥   r   r¦   r2   r    rt   r(   r§   r!   r#   r$   r*   )rv   ry   rz   r’   r{   r‘   r?   Ú
identity_nÚ
identity_mr}   r©   rª   r|   s   &&&&&        rm   r�   r�   {  s©  € Ø—Y‘Y�N€KÜ—’˜“€JÜ—’˜Ó$€JÜÜ
�Šð ˜ !˜Õ$Ø ¨! Õ,Ð,ðô
 —H’H˜k¬B×,<Ò,<¸ZÓ,HÕHÈ!ÐLÓMØ ¨Q Õ/Ð/ðð
   ¨! Õ,Ð,Ü—H’H˜a¤"×"2Ò"2°7Ó";Õ;¸[ÐIÓJðð
 ˜x¨˜{Õ+Ü—H’H˜a¤"×"2Ò"2°7Ó";Õ;¸[ÐIÓJððó	
÷& ‰!Øô+�G€Aˆ!ô. ×ÒÜ
�ŠŒr�wŠw�q‹zÓØÜ
õà�?õô �)‰)�.‰.˜Ð,œRŸVšV A§G¡G›_Ð,Ð.?´·²°q·w±w³Ð.?Ð?Õ@Àqˆ.Ó
IõJñ	Jó€Eð ˆ8€Or«   c                 óÀ  € W,          pW,          pVR ,          W ,          ,
          p\         P                  ! \        VR ,          WE,          ,           R4      4      pVR8:  d=   V\        \	        Wc,
          4      ,          8”  d   \        Wc,
          V,          R4      pV# \	        Wc,           4      \        V,          8”  d   \        WVV,           ,          R4      pV# \
        h)r   r   )r   r0   r"   r'   r(   r&   )rB   rC   r;   Ústep_sdÚsd_sqÚ
dist_tr_sqÚtemprH   s   &&&     rm   r%   r%      s­   € Ø�i€GØ�G€EØ˜•˜d�kÕ)€JÜ�7Š7”3�w •| eÕ&8Õ8¸#Ó>Ó?€DØ�#„~˜%¤$¬¨T­^Ó)<Õ"<Ô<Ü˜�¨%Õ/°Ó5ˆð
 €Oô	 
ˆT�^Ó	œt jÕ0Ô	0Ü�z¨G¥^Õ4°cÓ:ˆð €Oô  Ðr«   c                 ó\   € \         P                  ! V \         P                  ! V 4      8¬  4      # ©N)r   Úflatnonzeror"   ©Úxs   &rm   Ú_argmaxr¹   ®  ó   € Ü�>Š>˜!œrŸvšv a›y™.Ó)Ð)r«   c                 ó\   € \         P                  ! V \         P                  ! V 4      8*  4      # rµ   )r   r¶   r*   r·   s   &rm   r.   r.   ²  rº   r«   )r   Únumpyr   Úscipy.linalgr   Úutilsr   Úfinfor   Útinyr'   Úepsr!   rn   rŠ   r    rs   r�   r%   r¹   r.   © r«   rm   Ú<module>rÃ      sh   ðÛ ã Ý å "ð 
‡x‚x�ƒ×Ñ€Ø‡h‚hˆuƒo×Ñ€òsòl	`òFzòzò0"òJò*ô*r«   