+
    ùª¨j*-  ã                   óž   € ^ RI HtHtHtHtHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^RIHt R.t]! RR7      RR
RRRRR	RR	RR	RRRR/R ll4       tR	# )é    )ÚinnerÚvdotÚiscomplexobjÚzerosÚinfÚfinfo)Únorm)Úsqrt)Úxp_capabilities)Úmake_systemÚminresT)Únp_onlyNÚrtolgñhãˆµøä>Úshiftg        ÚmaxiterÚMÚcallbackÚshowFÚcheckc               ó®  € \        WW!4      w  rr¡\        V 4      '       d   \        M\        pV P                  pVP                  pRpRpV P
                  ^ ,          pVf
   ^V,          p. R#OpV'       dQ   \        VR,           4       \        VRVR RVR 2,           4       \        VRVR R	VR
 2,           4       \        4        ^ p^ p^ p^ p^ p^ pV
P                  p\        V4      P                  pVf   VP                  4       pMWV
,          ,
          pV! V4      pV! VV4      pV^ 8  d   \        R4      hV^ 8X  d   V
^ 3# \        V4      pV^ 8X  d   Tp
V
^ 3# \        VP                  4      pV	'       d³   V! V4      pV! V4      pV! VV4      p V! VV4      p!\        V V!,
          4      p"V V,           VR$,          ,          p#V"V#8”  d   \        R4      hV! V4      pV! VV4      p V! VV4      p!\        V V!,
          4      p"V V,           VR$,          ,          p#V"V#8”  d   \        R4      h^ p$Tp%^ p&^ p'Tp(Tp)Tp*^ p+^ p,^ p-\        V4      P                   p.R%p/^ p0\#        VVR7      p\#        VVR7      p1TpV'       d    \        4        \        4        \        R4       VV8  Ed   V^,          pRV%,          p V V,          p2V! V24      pVVV2,          ,
          pV^8¼  d   VV%V$,          V,          ,
          pV! V2V4      p3VV3V%,          V,          ,
          pTpTpV! V4      pT%p$V! VV4      p%V%^ 8  d   \        R4      h\        V%P                  4      p%V,V3^,          V$^,          ,           V%^,          ,           ,          p,V^8X  d   V%V,          ^
V,          8:  d   R%pT'p4V/V&,          V0V3,          ,           p5V0V&,          V/V3,          ,
          p6V0V%,          p'V/) V%,          p&\        V6V&.4      p7V)V7,          p8\        V6V%.4      P%                  V4      p9\!        V9V4      p9V6V9,          p/V%V9,          p0V/V),          p:V0V),          p)RV9,          p;T1p<Tp1V2V4V<,          ,
          V5V1,          ,
          V;,          pV
V:V,          ,           p
\!        V-V94      p-\'        V.V94      p.V*V9,          p"V+V5V",          ,
          p*V') V",          p+\        V,P                  4      p\        V
4      pVV,          p#VV,          V,          p=VV,          V,          p>T6p?V?^ 8X  d   T#p?T)p(T(pV^ 8X  g   V^ 8X  d   \(        p@MVVV,          ,          p@V^ 8X  d   \(        pAM	V7V,          pAV-V.,          pV^ 8X  dY   ^X@,           pB^XA,           pCVC^8:  d   ^pXB^8:  d   ^pVV8¼  d   ^pVRV,          8¼  d   ^pV=V8¼  d   ^pXAV8:  d   ^pX@V8:  d   ^pRpDV^(8:  d   RpDV^
8:  d   RpDVV^
,
          8¼  d   RpDV^
,          ^ 8X  d   RpDV(^
V=,          8:  d   RpDV(^
V>,          8:  d   RpDVRV,          8:  d   RpDV^ 8w  d   RpDV'       di   XD'       da   VR RV
^ ,          R RX@R 2pERXAR 2pFRVR RVR RV6V,          R 2pG\        VEVF,           VG,           4       V^
,          ^ 8X  d   \        4        Ve	   V! V
4       V^ 8w  g   EK   V'       d�   \        4        \        VRVR RVR 2,           4       \        VRVR RVR 2,           4       \        VR VR R!VR 2,           4       \        VR"X8R 2,           4       \        VVV^,           ,          ,           4       V^8X  d   TpHV
VH3# ^ pHV
XH3# )&aC  
Solve ``Ax = b`` with the MINimum RESidual method,
for a real symmetric or complex hermitian matrix `A`.

MINRES minimizes ``norm(Ax - b)`` for a real symmetric or complex hermitian
matrix `A`. Unlike the Conjugate Gradient method, `A` can be indefinite
or singular.

If ``shift != 0`` then the method solves ``(A - shift*I)x = b``.

Parameters
----------
A : {sparse array, ndarray, LinearOperator}
    The real symmetric or complex hermitian N-by-N matrix of the
    linear system. Alternatively, `A` can be a linear operator which can
    produce ``Ax`` using, e.g.,
    ``scipy.sparse.linalg.LinearOperator``.
b : ndarray
    Right hand side of the linear system. Has shape (N,) or (N,1).

Returns
-------
x : ndarray
    The converged solution.
info : int
    Provides convergence information:
        0  : successful exit
        >0 : convergence to tolerance not achieved, number of iterations
        <0 : illegal input or breakdown

Other Parameters
----------------
x0 : ndarray
    Starting guess for the solution.
rtol : float
    Tolerance to achieve. The algorithm terminates when the relative
    residual is below ``rtol``.
shift : float
    Value to apply to the system ``(A - shift * I)x = b``. Default is 0.
maxiter : int
    Maximum number of iterations.  Iteration will stop after maxiter
    steps even if the specified tolerance has not been achieved.
M : {sparse array, ndarray, LinearOperator}
    Preconditioner for `A`.  The preconditioner should approximate the
    inverse of `A`.  Effective preconditioning dramatically improves the
    rate of convergence, which implies that fewer iterations are needed
    to reach a given error tolerance.
callback : function
    User-supplied function to call after each iteration.  It is called
    as ``callback(xk)``, where ``xk`` is the current solution vector.
show : bool
    If ``True``, print out a summary and metrics related to the solution
    during iterations. Default is ``False``.
check : bool
    If ``True``, run additional input validation to check that `A` and
    `M` (if specified) are symmetric. Default is ``False``.

Notes
-----
This file is a translation of the MATLAB implementation [2]_.

References
----------
.. [1] Solution of sparse indefinite systems of linear equations,
      C. C. Paige and M. A. Saunders (1975),
      SIAM J. Numer. Anal. 12(4), pp. 617-629.
      https://web.stanford.edu/group/SOL/software/minres/
.. [2] https://web.stanford.edu/group/SOL/software/minres/minres-matlab.zip

Examples
--------
>>> import numpy as np
>>> from scipy.sparse import csc_array
>>> from scipy.sparse.linalg import minres
>>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
>>> A = A + A.T
>>> b = np.array([2, 4, -1], dtype=float)
>>> x, exitCode = minres(A, b)
>>> print(exitCode)            # 0 indicates successful convergence
0
>>> np.allclose(A.dot(x), b)
True
zEnter minres.   zExit  minres.   zSolution of symmetric Ax = bz
n      =  Ú3gz     shift  =  z23.14ez
itnlim =  z     rtol   =  z11.2ezindefinite preconditionerg      ð?znon-symmetric matrixznon-symmetric preconditioner)ÚdtypezD   Itn     x(1)     Compatible    LS       norm(A)  cond(A) gbar/|A|gš™™™™™¹?FTg{®Gáz„?Ú6gÚ z12.5ez10.3ez8.1ez istop   =  z               itn   =Ú5gz Anorm   =  z12.4ez      Acond =  z rnorm   =  z      ynorm =  z Arnorm  =  )z3 beta2 = 0.  If M = I, b and x are eigenvectors    z/ beta1 = 0.  The exact solution is x0          z3 A solution to Ax = b was found, given rtol        z3 A least-squares solution was found, given rtol    z3 Reasonable accuracy achieved, given eps           z3 x has converged to an eigenvector                 z3 acond has exceeded 0.1/eps                        z3 The iteration limit was reached                   z3 A  does not define a symmetric matrix             z3 M  does not define a symmetric matrix             z3 M  does not define a pos-def preconditioner       gUUUUUUÕ?éÿÿÿÿ)r   r   r   r   ÚmatvecÚshapeÚprintr   r   ÚepsÚcopyÚ
ValueErrorr	   r
   ÚrealÚabsÚmaxr   ÚastypeÚminr   )IÚAÚbÚx0r   r   r   r   r   r   r   ÚxÚdotprodr   ÚpsolveÚfirstÚlastÚnÚmsgÚistopÚitnÚAnormÚAcondÚrnormÚynormÚxtyper    Úr1ÚyÚbeta1ÚbnormÚwÚr2ÚsÚtÚzÚepsaÚoldbÚbetaÚdbarÚepslnÚqrnormÚphibarÚrhs1Úrhs2Útnorm2ÚgmaxÚgminÚcsÚsnÚw2ÚvÚalfaÚoldepsÚdeltaÚgbarÚrootÚArnormÚgammaÚphiÚdenomÚw1ÚepsxÚepsrÚdiagÚtest1Útest2Út1Út2ÚprntÚstr1Ústr2Ústr3ÚinfosI   &&&$$$$$$$                                                               Ú^C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\scipy\sparse\linalg\_isolve\minres.pyr   r      su  € ôl ˜Q 2Ó)�J€Aˆ!ä" 1—o’o�d¬5€GØ�X‰X€FØ�X‰X€Fà€EØ€Dà	�‰��
€Aà‚Ø�a•%ˆò
C€C÷ ÜˆeÐ4Õ4Ô5Üˆe˜
 1 R &¨¸¸f°~ÐFÕFÔGÜˆe˜
 7¨2 ,¨o¸dÀ5¸\ÐJÕJÔKÜŒà€EØ
€CØ€EØ€EØ€EØ€Eà�G‰G€Eä
�‹,×
Ñ
€Cð 
‚zØ�V‰V‹X‰à�1•�WˆÙˆr‹
€Aá�B˜‹N€Eàˆq„yÜÐ4Ó5Ð5Ø	�!ŒØ�1ˆvˆä�‹G€EØ�„zØˆØ�1ˆvˆä�—‘Ó€Eçñ �1‹IˆÙ�A‹YˆÙ�A�a‹LˆÙ�A�b‹MˆÜ��A•‹JˆØ�C•˜3 �>Õ)ˆØˆtŒ8ÜÐ3Ó4Ð4ñ �A‹YˆÙ�A�a‹LˆÙ�B�r‹NˆÜ��A•‹JˆØ�C•˜3 �>Õ)ˆØˆtŒ8ÜÐ;Ó<Ð<ð €DØ€DØ€DØ€EØ€FØ€FØ€DØ€DØ€FØ€DÜ�‹<×Ñ€DØ	€BØ	
€BÜˆa�uÔ€AÜ	ˆq˜Ô	€BØ	€BçÜŒÜŒÜÐTÔUà
��-Øˆq�ˆà��HˆØˆa�Cˆá�1‹IˆØ�˜•	�Mˆà�!Œ8Ø�T˜$•Y •NÕ"ˆAá�q˜‹|ˆØ��d•˜B•ÕˆØˆØˆÙ�2‹JˆØˆÙ�r˜!‹}ˆØ�!Œ8ÜÐ3Ó4Ð4Ü�D—I‘I‹ˆØ�$˜•'˜D !�GÕ# d¨A¥gÕ-Õ-ˆà�!Œ8Ø�E�z˜R �VÔ#Ø�ð ˆØ�T•	˜B �IÕ%ˆØ�D�y˜2 �9Õ$ˆØ�T•	ˆØˆt�d�{ˆÜ�T˜4�LÓ!ˆØ˜$•ˆô �d˜D�\Ó"×)Ñ)¨%Ó0ˆÜ�E˜3“ˆØ�E�\ˆØ�E�\ˆØ�6�kˆØ�f•ˆð �E•	ˆØˆØˆØ�˜•�]˜U 2�XÕ%¨Õ.ˆØ��A•�Iˆô �4˜ÓˆÜ�4˜ÓˆØ�5�LˆØ�e˜A•g�~ˆØˆw�q�yˆô �V—[‘[Ó!ˆÜ�Q“ˆØ�s�{ˆØ�u�}˜sÕ"ˆØ�u�}˜tÕ#ˆØˆà�1Œ9ØˆDàˆØˆØ�AŒ:˜ !œÜ‰Eà˜U 5�[Õ)ˆEØ�AŒ:Ü‰Eà˜5•LˆEð �T•	ˆð
 �AŒ:Ø�U•ˆBØ�U•ˆBØ�QŒwØ�Ø�QŒwØ�à�gŒ~Ø�Ø˜˜C�ÔØ�Ø�uŒ}Ø�ð ˜Œ}Ø�Ø˜Œ}Ø�ð ˆØ�Œ7ØˆDØ�"Œ9ØˆDØ�'˜"•*ÔØˆDØ��8�qŒ=ØˆDØ�R˜•WÔØˆDØ�R˜•WÔØˆDØ�D˜•HÔØˆDØ�AŒ:ØˆDç—DØ˜"�X˜Q˜q �t E˜l¨!¨E°%¨=Ð9ˆDØ�u˜U�mÐ$ˆDØ�u˜T�l ! E¨$ <¨q°°eµ¸DÐ0AÐBˆDä�$˜•+ Õ$Ô%à�R�x˜1Œ}Ü”àÒÙ�QŒKà�A�:ØçÜŒÜˆd�| E¨" :Ð-CÀCÈÀ8ÐLÕLÔMÜˆd�| E¨% =°ÀÀe¸}ÐMÕMÔNÜˆd�| E¨% =°ÀÀe¸}ÐMÕMÔNÜˆd�| F¨5 >Ð2Õ2Ô3Üˆd�S˜˜q�•\Õ!Ô"à�„zØˆð ˆdˆ8€Oð ˆàˆdˆ8€Oó    )N)Únumpyr   r   r   r   r   r   Únumpy.linalgr	   Úmathr
   Úscipy._lib._array_apir   Úutilsr   Ú__all__r   © ri   rh   Ú<module>rq      su   ðß >× >Ý Ý å 1å àˆ*€ñ ˜Ôñn $ð n¨cð n¸4ð nØðnØ ðnØ',ðnØ49ônó ònri   