403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/sparse/linalg/_isolve/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/sparse/linalg/_isolve/__pycache__/iterative.cpython-311.pyc
�

d�c�v��,�dZgd�ZddlZddlmZddlZddlmZddl	m
Z
ddlmZdd	l
mZdd
lmZddd
dd�ZdZdZd�Zd�Zd+d�Zeddd���e��d,d�����Zeddd���e��d,d �����Zed!d"d#���e��d,d$�����Zed%d&d'���e��d,d(�����Ze��		d-d)���Ze��		d.d*���ZdS)/z,Iterative methods for solving linear systems)�bicg�bicgstab�cg�cgs�gmres�qmr�N)�dedent�)�
_iterative)�LinearOperator)�make_system)�_aligned_zeros)�
non_reentrant�s�d�c�z)�fr�F�DzC
Parameters
----------
A : {sparse matrix, ndarray, LinearOperator}aXb : ndarray
    Right hand side of the linear system. Has shape (N,) or (N,1).

Returns
-------
x : ndarray
    The converged solution.
info : integer
    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.
tol, atol : float, optional
    Tolerances for convergence, ``norm(residual) <= max(tol*norm(b), atol)``.
    The default for ``atol`` is ``'legacy'``, which emulates
    a different legacy behavior.

    .. warning::

       The default value for `atol` will be changed in a future release.
       For future compatibility, specify `atol` explicitly.
maxiter : integer
    Maximum number of iterations.  Iteration will stop after maxiter
    steps even if the specified tolerance has not been achieved.
M : {sparse matrix, 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.
c�\�tj�|��}||kr|dfS|dfS)z;
    Successful termination condition for the solvers.
    r
r��np�linalg�norm)�residual�atol�resids   �G/usr/lib/python3/dist-packages/scipy/sparse/linalg/_isolve/iterative.py�	_stoptestr Cs2��
�I�N�N�8�$�$�E���}�}��a�x���a�x��c�F�|�2tjd�|���td���d}t	|��}|dkr,|��}||krdS|dkr|S|t	|��zStt	|��|t	|��z��S)	a�
    Parse arguments for absolute tolerance in termination condition.

    Parameters
    ----------
    tol, atol : object
        The arguments passed into the solver routine by user.
    bnrm2 : float
        2-norm of the rhs vector.
    get_residual : callable
        Callable ``get_residual()`` that returns the initial value of
        the residual.
    routine_name : str
        Name of the routine.
    Na	scipy.sparse.linalg.{name} called without specifying `atol`. The default value will be changed in a future release. For compatibility, specify a value for `atol` explicitly, e.g., ``{name}(..., atol=0)``, or to retain the old behavior ``{name}(..., atol='legacy')``)�name���category�
stacklevel�legacy�exitr)�warnings�warn�format�DeprecationWarning�float�max)�tolr�bnrm2�get_residual�routine_namers      r�	_get_atolr4Ns���"�|��
�7�8>�v�<�v�7P�7P�1�a�	A�	A�	A�	A���
��*�*�C��x���������C�<�<��6��A�:�:��J���u���%�%��5��;�;��e�E�l�l� 2�3�3�3r!��0c��������fd�}|S)Nc	���d��td��dd��ztt	���f��|_|S)N�
z    z
    )�join�common_doc1�replace�common_doc2r	�__doc__)�fn�Ainfo�footer�headers ���r�combinezset_docstring.<locals>.combinexsI����Y�Y��� &����t�X�)F�)F� F� +�V�F�^�^� =�>�>��
��	r!�)rBr@rA�atol_defaultrCs```  r�
set_docstringrFws/������������
�Nr!z7Use BIConjugate Gradient iteration to solve ``Ax = b``.z�The real or complex N-by-N matrix of the linear system.
Alternatively, ``A`` can be a linear operator which can
produce ``Ax`` and ``A^T x`` using, e.g.,
``scipy.sparse.linalg.LinearOperator``.a1               Examples
               --------
               >>> import numpy as np
               >>> from scipy.sparse import csc_matrix
               >>> from scipy.sparse.linalg import bicg
               >>> A = csc_matrix([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
               >>> b = np.array([2, 4, -1], dtype=float)
               >>> x, exitCode = bicg(A, b)
               >>> print(exitCode)            # 0 indicates successful convergence
               0
               >>> np.allclose(A.dot(x), b)
               True

               )rA��h㈵��>c�����t|||���\}}��}t���}	|�|	dz}|j|jc�}
|j|j}}t�jj}
tt|
dz��}���fd�}t||tj����|d��}|dkr
|���dfS|}d}d}td	|	z�j�
��}d}d}d}|}	|}|��|||||||�	�	\	�}}}}}}}}|�||kr|���t|dz
|dz
|	z��}t|dz
|dz
|	z��}|dkr|�|����n|dkr3||xx|zcc<||xx|�||��zz
cc<n�|dkr3||xx|zcc<||xx||
||��zz
cc<n�|d
kr|||��||<ns|dkr|||��||<nX|dkr-||xx|zcc<||xx|����zz
cc<n%|d	kr|rd}d}t|||��\}}d}��}|dkr||kr||ks|}|���|fS)N�
�
bicgrevcomc�Z��tj������z
��S�Nr��b�matvec�xs���r�<lambda>zbicg.<locals>.<lambda>��!���2�9�>�>�&�&��)�)�a�-�8�8�r!rr)rr
������dtypeT��r$�F)r
�lenrO�rmatvec�
_type_convrV�char�getattrrr4rrrr�slicer )�ArN�x0r0�maxiter�M�callbackr�postprocess�nr[�psolve�rpsolve�ltr�revcomr2r�ndx1�ndx2�work�ijob�info�ftflag�iter_�olditer�sclr1�sclr2�slice1�slice2rOrPs `                           @@rrr�sE�����.&�a��B��2�2��A�a��!�K��A���A����B�$���h��	�O�F�G��h��	�G�F�
�Q�W�\�
"�C�
�Z��|�!3�
4�
4�F�8�8�8�8�8�8�L��S�$��	���q� 1� 1�<��H�H�D��v�~�~��{�1�~�~�q� � ��E��D�
�D��!�A�#�A�G�,�,�,�D��D��D�
�F��E�����6�!�Q��e�U�D�$��d�C�C�	>��5�%��t�T�5�%����E�G�O�O��H�Q�K�K�K��t�A�v�t�A�v�a�x�(�(���t�A�v�t�A�v�a�x�(�(���B�J�J��#���������a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��f��"6�"6�6�6�L�L�L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�'�'�$�v�,�"7�"7�7�7�L�L�L�L��a�i�i�!�6�$�v�,�/�/�D��L�L��a�i�i�"�7�4��<�0�0�D��L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��)�)�O�+�L�L�L�L��a�i�i��
�����#�D��L�$�7�7�K�E�4���=�@�a�x�x�E�W�$�$�e�t�m�m����;�q�>�>�4��r!zBUse BIConjugate Gradient STABilized iteration to solve ``Ax = b``.z�The real or complex 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``.a�               Examples
               --------
               >>> import numpy as np
               >>> from scipy.sparse import csc_matrix
               >>> from scipy.sparse.linalg import bicgstab
               >>> R = np.array([[4, 2, 0, 1],
               ...               [3, 0, 0, 2],
               ...               [0, 1, 1, 1],
               ...               [0, 2, 1, 0]])
               >>> A = csc_matrix(R)
               >>> b = np.array([-1, -0.5, -1, 2])
               >>> x, exit_code = bicgstab(A, b)
               >>> print(exit_code)  # 0 indicates successful convergence
               0
               >>> np.allclose(A.dot(x), b)
               True
               c�T����t|||���\}}��}t���}	|�|	dz}|j�|j}
t�jj}t
t|dz��}���fd�}
t||tj
����|
d��}|dkr
|���dfS|}d}d}td	|	z�j�
��}d}d}d}|}	|}|��|||||||�	�	\	�}}}}}}}}|�||kr|���t|dz
|dz
|	z��}t|dz
|dz
|	z��}|dkr|�|���n�|dkr3||xx|zcc<||xx|�||��zz
cc<ns|dkr|
||��||<nX|d
kr-||xx|zcc<||xx|����zz
cc<n%|dkr|rd}d}t|||��\}}d}��(|dkr||kr||ks|}|���|fS)NrI�bicgstabrevcomc�Z��tj������z
��SrLrrMs���rrQzbicgstab.<locals>.<lambda>�rRr!rr)rr
rS�rUTrWrXr$F�r
rZrOr\rVr]r^rr4rrrrr_r �r`rNrar0rbrcrdrrerfrgrirjr2rrkrlrmrnrorprqrrrsrtrurvrOrPs `                         @@rrr�s������4*�!�Q��A�6�6��A�q�!�Q���A���A����B�$��
�X�F�
�X�F�
�Q�W�\�
"�C�
�Z��'7�!7�
8�
8�F�8�8�8�8�8�8�L��S�$��	���q� 1� 1�<��L�L�D��v�~�~��{�1�~�~�q� � ��E��D�
�D��!�A�#�A�G�,�,�,�D��D��D�
�F��E�����6�!�Q��e�U�D�$��d�C�C�	>��5�%��t�T�5�%����E�G�O�O��H�Q�K�K�K��t�A�v�t�A�v�a�x�(�(���t�A�v�t�A�v�a�x�(�(���B�J�J��#���������a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��f��"6�"6�6�6�L�L�L�L��a�i�i�!�6�$�v�,�/�/�D��L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��)�)�O�+�L�L�L�L��a�i�i��
�����#�D��L�$�7�7�K�E�4���3�6�a�x�x�E�W�$�$�e�t�m�m����;�q�>�>�4��r!z5Use Conjugate Gradient iteration to solve ``Ax = b``.z�The real or complex N-by-N matrix of the linear system.
``A`` must represent a hermitian, positive definite matrix.
Alternatively, ``A`` can be a linear operator which can
produce ``Ax`` using, e.g.,
``scipy.sparse.linalg.LinearOperator``.a�               Examples
               --------
               >>> import numpy as np
               >>> from scipy.sparse import csc_matrix
               >>> from scipy.sparse.linalg import cg
               >>> P = np.array([[4, 0, 1, 0],
               ...               [0, 5, 0, 0],
               ...               [1, 0, 3, 2],
               ...               [0, 0, 2, 4]])
               >>> A = csc_matrix(P)
               >>> b = np.array([-1, -0.5, -1, 2])
               >>> x, exit_code = cg(A, b)
               >>> print(exit_code)    # 0 indicates successful convergence
               0
               >>> np.allclose(A.dot(x), b)
               True

               c�����t|||���\}}��}t���}	|�|	dz}|j�|j}
t�jj}t
t|dz��}���fd�}
t||tj
����|
d��}|dkr
|���dfS|}d}d}td	|	z�j�
��}d}d}d}|}	|}|��|||||||�	�	\	�}}}}}}}}|�||kr|���t|dz
|dz
|	z��}t|dz
|dz
|	z��}|dkr|�|���n�|dkr3||xx|zcc<||xx|�||��zz
cc<n�|dkr|
||��||<n�|d
kr-||xx|zcc<||xx|����zz
cc<n[|d	krU|rd}d}t|||��\}}|dkr0|dkr*�����z
||<t|||��\}}d}��^|dkr||kr||ks|}|���|fS)NrI�cgrevcomc�Z��tj������z
��SrLrrMs���rrQzcg.<locals>.<lambda>RrRr!rr)rr
rSr$rUTrWrXFr{r|s `                         @@rrr,s
�����6*�!�Q��A�6�6��A�q�!�Q���A���A����B�$��
�X�F�
�X�F�
�Q�W�\�
"�C�
�Z��z�!1�
2�
2�F�8�8�8�8�8�8�L��S�$��	���q� 1� 1�<��F�F�D��v�~�~��{�1�~�~�q� � ��E��D�
�D��!�A�#�A�G�,�,�,�D��D��D�
�F��E�����6�!�Q��e�U�D�$��d�C�C�	>��5�%��t�T�5�%����E�G�O�O��H�Q�K�K�K��t�A�v�t�A�v�a�x�(�(���t�A�v�t�A�v�a�x�(�(���B�J�J��#���������a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��f��"6�"6�6�6�L�L�L�L��a�i�i�!�6�$�v�,�/�/�D��L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��)�)�O�+�L�L�L�L��a�i�i��
�����#�D��L�$�7�7�K�E�4��q�y�y�U�Q�Y�Y� !�6�6�!�9�9�}��V��'��V��d�;�;���t���=�@�a�x�x�E�W�$�$�e�t�m�m����;�q�>�>�4��r!z=Use Conjugate Gradient Squared iteration to solve ``Ax = b``.z�The real-valued 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``.a�               Examples
               --------
               >>> import numpy as np
               >>> from scipy.sparse import csc_matrix
               >>> from scipy.sparse.linalg import cgs
               >>> R = np.array([[4, 2, 0, 1],
               ...               [3, 0, 0, 2],
               ...               [0, 1, 1, 1],
               ...               [0, 2, 1, 0]])
               >>> A = csc_matrix(R)
               >>> b = np.array([-1, -0.5, -1, 2])
               >>> x, exit_code = cgs(A, b)
               >>> print(exit_code)  # 0 indicates successful convergence
               0
               >>> np.allclose(A.dot(x), b)
               True
               c�����t|||���\}}��}t���}	|�|	dz}|j�|j}
t�jj}t
t|dz��}���fd�}
t||tj
����|
d��}|dkr
|���dfS|}d}d}td	|	z�j�
��}d}d}d}|}	|}|��|||||||�	�	\	�}}}}}}}}|�||kr|���t|dz
|dz
|	z��}t|dz
|dz
|	z��}|dkr|�|���n�|dkr3||xx|zcc<||xx|�||��zz
cc<n�|dkr|
||��||<n�|d
kr-||xx|zcc<||xx|����zz
cc<n[|dkrU|rd}d}t|||��\}}|dkr0|dkr*�����z
||<t|||��\}}d}��^|dkr#t�����z
|��\}}|rd}|dkr||kr||ks|}|���|fS)NrI�	cgsrevcomc�Z��tj������z
��SrLrrMs���rrQzcgs.<locals>.<lambda>�rRr!rr)rr
rSrzrUTrWrXr$Fi����r{)r`rNrar0rbrcrdrrerfrgrirjr2rrkrlrmrnrorprqrrrsrtrurv�okrOrPs `                          @@rrr�s?�����4*�!�Q��A�6�6��A�q�!�Q���A���A����B�$��
�X�F�
�X�F�
�Q�W�\�
"�C�
�Z��{�!2�
3�
3�F�8�8�8�8�8�8�L��S�$��	���q� 1� 1�<��G�G�D��v�~�~��{�1�~�~�q� � ��E��D�
�D��!�A�#�A�G�,�,�,�D��D��D�
�F��E�����6�!�Q��e�U�D�$��d�C�C�	>��5�%��t�T�5�%����E�G�O�O��H�Q�K�K�K��t�A�v�t�A�v�a�x�(�(���t�A�v�t�A�v�a�x�(�(���B�J�J��#���������a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��f��"6�"6�6�6�L�L�L�L��a�i�i�!�6�$�v�,�/�/�D��L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��)�)�O�+�L�L�L�L��a�i�i��
�����#�D��L�$�7�7�K�E�4��q�y�y�U�Q�Y�Y� !�6�6�!�9�9�}��V��'��V��d�;�;���t���=�@�s�{�{��a�&�&��)�)�m�T�2�2�	��r�
�	��D��a�x�x�E�W�$�$�e�t�m�m����;�q�>�>�4��r!c���)�*�|�|}n/|�td���d}tj|td���|�|
�tjdtd���|
�d	}
|
d
vr"td�|
�����|�d}
t|||���\}}�*�}t
���}
|�|
d
z}|�d}t||
��}|j�)|j}t�*j
j}tt|dz��}tj����}tj�|�����}��)�*fd�}t#||	||d��}	|	dkr
|�*��dfS|dkr
|���dfSd}|t||	|z��z}tj}tj}d}d}t'd|z|
z�*j
���}t'|dzd|zdzz�*j
���}d}d}d}|}|} d}!d}"d}#	|}$|��*||||||||||��\	�*}}}}}}%}&}|
dkr||$kr|�*��t)|dz
|dz
|
z��}'t)|dz
|dz
|
z��}(|dkr(|
dvr|"r|||z��n|
dkr|�*���n9|dkr-||(xx|&zcc<||(xx|%�)�*��zz
cc<n�|dkr!|||(��||'<|!s| dkrd}"d}!n�|dkrN||(xx|&zcc<||(xx|%�)||'��zz
cc<|"r|
dvr|||z��d}"|#dz}#nv|dkrp|rd}d}t+||'|	��\}}|s||krtdd|z��}nt-dd |z��}|dkr|t||	|z��z}n||z}|} d}|
d	kr	|#|kr|}n���|dkr||	ks|}|�*��|fS)!a�
    Use Generalized Minimal RESidual iteration to solve ``Ax = b``.

    Parameters
    ----------
    A : {sparse matrix, ndarray, LinearOperator}
        The real or complex 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 (a vector of zeros by default).
    tol, atol : float, optional
        Tolerances for convergence, ``norm(residual) <= max(tol*norm(b), atol)``.
        The default for ``atol`` is ``'legacy'``, which emulates
        a different legacy behavior.

        .. warning::

           The default value for `atol` will be changed in a future release.
           For future compatibility, specify `atol` explicitly.
    restart : int, optional
        Number of iterations between restarts. Larger values increase
        iteration cost, but may be necessary for convergence.
        Default is 20.
    maxiter : int, optional
        Maximum number of iterations (restart cycles).  Iteration will stop
        after maxiter steps even if the specified tolerance has not been
        achieved.
    M : {sparse matrix, ndarray, LinearOperator}
        Inverse of the preconditioner of A.  M should approximate the
        inverse of A and be easy to solve for (see Notes).  Effective
        preconditioning dramatically improves the rate of convergence,
        which implies that fewer iterations are needed to reach a given
        error tolerance.  By default, no preconditioner is used.
    callback : function
        User-supplied function to call after each iteration.  It is called
        as `callback(args)`, where `args` are selected by `callback_type`.
    callback_type : {'x', 'pr_norm', 'legacy'}, optional
        Callback function argument requested:
          - ``x``: current iterate (ndarray), called on every restart
          - ``pr_norm``: relative (preconditioned) residual norm (float),
            called on every inner iteration
          - ``legacy`` (default): same as ``pr_norm``, but also changes the
            meaning of 'maxiter' to count inner iterations instead of restart
            cycles.
    restrt : int, optional, deprecated

        .. deprecated:: 0.11.0
           `gmres` keyword argument `restrt` is deprecated infavour of
           `restart` and will be removed in SciPy 1.12.0.

    See Also
    --------
    LinearOperator

    Notes
    -----
    A preconditioner, P, is chosen such that P is close to A but easy to solve
    for. The preconditioner parameter required by this routine is
    ``M = P^-1``. The inverse should preferably not be calculated
    explicitly.  Rather, use the following template to produce M::

      # Construct a linear operator that computes P^-1 @ x.
      import scipy.sparse.linalg as spla
      M_x = lambda x: spla.spsolve(P, x)
      M = spla.LinearOperator((n, n), M_x)

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse import csc_matrix
    >>> from scipy.sparse.linalg import gmres
    >>> A = csc_matrix([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
    >>> b = np.array([2, 4, -1], dtype=float)
    >>> x, exitCode = gmres(A, b)
    >>> print(exitCode)            # 0 indicates successful convergence
    0
    >>> np.allclose(A.dot(x), b)
    True
    NzOCannot specify both restart and restrt keywords. Preferably use 'restart' only.zj'gmres' keyword argument 'restrt' is deprecated infavour of 'restart' and will be removed in SciPy 1.12.0.rW)r'a4scipy.sparse.linalg.gmres called without specifying `callback_type`. The default value will be changed in a future release. For compatibility, specify a value for `callback_type` explicitly, e.g., ``{name}(..., callback_type='pr_norm')``, or to retain the old behavior ``{name}(..., callback_type='legacy')``rXr%r()rP�pr_normr(zUnknown callback_type: {!r}�nonerI��gmresrevcomc�Z��tj������z
��SrLrrMs���rrQzgmres.<locals>.<lambda>zrRr!rr)rg�?r
rSrTrUTFrP)r�r(r$g�?g��ؗ�Ҝ<g�?)�
ValueErrorr*r+r-r,r
rZ�minrOr\rVr]r^rrrrr4�nanrr_r r/)+r`rNrar0�restartrbrcrd�restrtr�
callback_type�msgrerfrgrirjr1�Mb_nrm2r2�ptol_max_factor�ptolr�presidrkrlrm�work2rnrorprq�old_ijob�
first_pass�resid_ready�iter_numrrrsrtrurvrOrPs+ `                                       @@rrr�sV�����J�~����	�	��:�;�;�	;�@���
�c�-�!�<�<�<�<���
� 5�	�
�@�
 2�a�	A�	A�	A�	A��� �
��6�6�6��6�=�=�m�L�L�M�M�M����
�(��A�r�1�5�5��A�q�!�Q�{��A���A����B�$��
�~���
���^�^�F�
�X�F�
�X�F�
�Q�W�\�
"�C�
�Z��}�!4�
5�
5�F��I�N�N�1���E��i�n�n�V�V�A�Y�Y�'�'�G�8�8�8�8�8�8�L��S�$��|�W�=�=�D��v�~�~��{�1�~�~�q� � ���z�z��{�1�~�~�q� � ��O��S��$��,�7�7�7�D��F�E�
�V�F��D�
�D��1�V�8�Q�,�Q�W�5�5�5�D��F�1�H�q��x��z�2���A�A�A�E��D��D�
�F��E��H��J��K��H�:����6�!�Q���e�U�F�D�$��d�TX�Y�Y�	?��5�&�$��d�E�5�$��C���E�W�$4�$4��H�Q�K�K�K��t�A�v�t�A�v�a�x�(�(���t�A�v�t�A�v�a�x�(�(���B�J�J�� 5�5�5��-��H�V�e�^�,�,�,���#�%�%���������a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��)�)�O�+�L�L�L�L��a�i�i�!�6�$�v�,�/�/�D��L��
#�(�a�-�-�"���J�J��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�&�&��f��"6�"6�6�6�L�L�L��
&� �$9�9�9��H�V�e�^�,�,�,�#��#�A�:����a�i�i��
�����#�D��L�$�7�7�K�E�4��
E�v��}�}�"%�c�3��+@�"A�"A���#&�e�T�O�-C�"D�"D����z�z���O�T�E�\� B� B�B�����/�������H�$�$��'�!�!����u:�x�q�y�y�%�4�-�-����;�q�>�>�4��r!c	�����!�"���!t�d|���\�}	�"�}
|��|��t�!d��rC�!fd�}�!fd�}�!fd�}
�!fd�}t�j||
���}t�j||���}n1d�}t�j||���}t�j||���}t	���}|�|d	z}t
�"jj}tt|d
z��}���"fd�}t||tj�
���|d��}|d
kr
|
�"��dfS|}d}d}td|z�"j��}d}d}d}|}	|}|��"|||||||�	�	\	�"}}}}}}}}|�||kr|�"��t|dz
|dz
|z��}t|dz
|dz
|z��} |dkr|�|�"���n�|dkr>|| xx|zcc<|| xx|��||��zz
cc<�n9|dkr=|| xx|zcc<|| xx|��||��zz
cc<n�|dkr|�|| ��||<n�|dkr|�|| ��||<n�|dkr|�|| ��||<n�|dkr|�|| ��||<nb|dkr7|| xx|zcc<|| xx|���"��zz
cc<n%|dkr|rd}d}t%|||��\}}d}���|dkr||kr||ks|}|
�"��|fS)a	Use Quasi-Minimal Residual iteration to solve ``Ax = b``.

    Parameters
    ----------
    A : {sparse matrix, ndarray, LinearOperator}
        The real-valued N-by-N matrix of the linear system.
        Alternatively, ``A`` can be a linear operator which can
        produce ``Ax`` and ``A^T x`` 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 : integer
        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.
    tol, atol : float, optional
        Tolerances for convergence, ``norm(residual) <= max(tol*norm(b), atol)``.
        The default for ``atol`` is ``'legacy'``, which emulates
        a different legacy behavior.

        .. warning::

           The default value for `atol` will be changed in a future release.
           For future compatibility, specify `atol` explicitly.
    maxiter : integer
        Maximum number of iterations.  Iteration will stop after maxiter
        steps even if the specified tolerance has not been achieved.
    M1 : {sparse matrix, ndarray, LinearOperator}
        Left preconditioner for A.
    M2 : {sparse matrix, ndarray, LinearOperator}
        Right preconditioner for A. Used together with the left
        preconditioner M1.  The matrix M1@A@M2 should have better
        conditioned than A alone.
    callback : function
        User-supplied function to call after each iteration.  It is called
        as callback(xk), where xk is the current solution vector.

    See Also
    --------
    LinearOperator

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse import csc_matrix
    >>> from scipy.sparse.linalg import qmr
    >>> A = csc_matrix([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
    >>> b = np.array([2, 4, -1], dtype=float)
    >>> x, exitCode = qmr(A, b)
    >>> print(exitCode)            # 0 indicates successful convergence
    0
    >>> np.allclose(A.dot(x), b)
    True
    Nrgc�0����|d��S�N�left�rg�rN�A_s �r�left_psolvezqmr.<locals>.left_psolve!s����y�y��6�*�*�*r!c�0����|d��S�N�rightr�r�s �r�right_psolvezqmr.<locals>.right_psolve$s����y�y��7�+�+�+r!c�0����|d��Sr��rhr�s �r�left_rpsolvezqmr.<locals>.left_rpsolve's����z�z�!�F�+�+�+r!c�0����|d��Sr�r�r�s �r�
right_rpsolvezqmr.<locals>.right_rpsolve*s����z�z�!�G�,�,�,r!)rOr[c��|SrLrD)rNs r�idzqmr.<locals>.id/s���r!rI�	qmrrevcomc�n��tj�������z
��SrL)rrrrO)r`rNrPs���rrQzqmr.<locals>.<lambda>;s#���2�9�>�>�!�(�(�1�+�+��/�:�:�r!rr)rr
rS�TrWrXr$rYrTrz�F)r
�hasattrr�shaperZr\rVr]r^rr4rrrrr_rOr[r )#r`rNrar0rb�M1�M2rdrrcrer�r�r�r�r�rfrirjr2rrkrlrmrnrorprqrrrsrtrurvr�rPs#``                               @@rrr�sj������H
�B�)�!�T�2�q�9�9��A�q�!�Q��	�z�b�j��2�h���	@�
+�
+�
+�
+�
+�
,�
,�
,�
,�
,�
,�
,�
,�
,�
,�
-�
-�
-�
-�
-�����\�R�R�R�B�����m�T�T�T�B�B�
�
�
�����B�?�?�?�B�����B�?�?�?�B��A���A����B�$��
�Q�W�\�
"�C�
�Z��{�!2�
3�
3�F�:�:�:�:�:�:�L��S�$��	���q� 1� 1�<��G�G�D��v�~�~��{�1�~�~�q� � ��E��D�
�D��"�Q�$�q�w�'�'�D��D��D�
�F��E�"����6�!�Q��e�U�D�$��d�C�C�	>��5�%��t�T�5�%����E�G�O�O��H�Q�K�K�K��t�A�v�t�A�v�a�x�(�(���t�A�v�t�A�v�a�x�(�(���B�J�J��#���������a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�!�(�(�4��<�"8�"8�8�8�L�L�L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�!�)�)�D��L�"9�"9�9�9�L�L�L�L��a�i�i��9�9�T�&�\�2�2�D��L�L��a�i�i��9�9�T�&�\�2�2�D��L�L��a�i�i��:�:�d�6�l�3�3�D��L�L��a�i�i��:�:�d�6�l�3�3�D��L�L��a�i�i���L�L�L�E�!�L�L�L���L�L�L�E�!�(�(�1�+�+�-�-�L�L�L�L��a�i�i��
�����#�D��L�$�7�7�K�E�4���E"�H�a�x�x�E�W�$�$�e�t�m�m����;�q�>�>�4��r!)r5r6)NrGNNNN)	NrGNNNNNNN)NrGNNNNN)r>�__all__r*�textwrapr	�numpyrr5r�scipy.sparse.linalg._interfacer�utilsr
�scipy._lib._utilr�scipy._lib._threadsafetyrr\r;r=r r4rFrrrrrrrDr!r�<module>r�s���2�2�
6�
6�
6����������������������9�9�9�9�9�9�������+�+�+�+�+�+�2�2�2�2�2�2��3�C�S�
1�
1�
�
0��%��R���&4�&4�&4�R������H�9�����*����> �> �> ���+��,> �B���9��
���0����9 �9 �9 ���1��29 �x��F�9�
�
���2����> �> �> ���3��4> �B��N�9�����0����D �D �D ���1��2D �N����PT�04�m �m �m ���m �`����JN�
�X �X �X ���X �X �X r!

Youez - 2016 - github.com/yon3zu
LinuXploit