§
    JŠtjNi  ã                   ó>   — d Z ddlmZ ddlmZ  G d„ de¦  «        ZdS )a¸  
Linear algebra
--------------

Linear equations
................

Basic linear algebra is implemented; you can for example solve the linear
equation system::

      x + 2*y = -10
    3*x + 4*y =  10

using ``lu_solve``::

    >>> from mpmath import *
    >>> mp.pretty = False
    >>> A = matrix([[1, 2], [3, 4]])
    >>> b = matrix([-10, 10])
    >>> x = lu_solve(A, b)
    >>> x
    matrix(
    [['30.0'],
     ['-20.0']])

If you don't trust the result, use ``residual`` to calculate the residual ||A*x-b||::

    >>> residual(A, x, b)
    matrix(
    [['3.46944695195361e-18'],
     ['3.46944695195361e-18']])
    >>> str(eps)
    '2.22044604925031e-16'

As you can see, the solution is quite accurate. The error is caused by the
inaccuracy of the internal floating point arithmetic. Though, it's even smaller
than the current machine epsilon, which basically means you can trust the
result.

If you need more speed, use NumPy, or ``fp.lu_solve`` for a floating-point computation.

    >>> fp.lu_solve(A, b)   # doctest: +ELLIPSIS
    matrix(...)

``lu_solve`` accepts overdetermined systems. It is usually not possible to solve
such systems, so the residual is minimized instead. Internally this is done
using Cholesky decomposition to compute a least squares approximation. This means
that that ``lu_solve`` will square the errors. If you can't afford this, use
``qr_solve`` instead. It is twice as slow but more accurate, and it calculates
the residual automatically.


Matrix factorization
....................

The function ``lu`` computes an explicit LU factorization of a matrix::

    >>> P, L, U = lu(matrix([[0,2,3],[4,5,6],[7,8,9]]))
    >>> print(P)
    [0.0  0.0  1.0]
    [1.0  0.0  0.0]
    [0.0  1.0  0.0]
    >>> print(L)
    [              1.0                0.0  0.0]
    [              0.0                1.0  0.0]
    [0.571428571428571  0.214285714285714  1.0]
    >>> print(U)
    [7.0  8.0                9.0]
    [0.0  2.0                3.0]
    [0.0  0.0  0.214285714285714]
    >>> print(P.T*L*U)
    [0.0  2.0  3.0]
    [4.0  5.0  6.0]
    [7.0  8.0  9.0]

Interval matrices
-----------------

Matrices may contain interval elements. This allows one to perform
basic linear algebra operations such as matrix multiplication
and equation solving with rigorous error bounds::

    >>> a = iv.matrix([['0.1','0.3','1.0'],
    ...             ['7.1','5.5','4.8'],
    ...             ['3.2','4.4','5.6']])
    >>>
    >>> b = iv.matrix(['4','0.6','0.5'])
    >>> c = iv.lu_solve(a, b)
    >>> print(c)
    [   [5.2582327113062568605927528666, 5.25823271130625686059275702219]]
    [[-13.1550493962678375411635581388, -13.1550493962678375411635540152]]
    [  [7.42069154774972557628979076189, 7.42069154774972557628979190734]]
    >>> print(a*c)
    [  [3.99999999999999999999999844904, 4.00000000000000000000000155096]]
    [[0.599999999999999999999968898009, 0.600000000000000000000031763736]]
    [[0.499999999999999999999979320485, 0.500000000000000000000020679515]]
é    )Úcopyé   )Úxrangec                   ó‚   — e Zd Zdd„Zdd„Zd„ Zd„ Zdd	„Zd
„ Zd„ Z	d„ Z
d„ Zd„ Zdd„Zdd„Zd„ Zd„ Zdd„Zd„ Zdd„ZdS )ÚLinearAlgebraMethodsFTc           
      óÐ  ‡ ‡‡— ‰j         ‰j        k    st          d¦  «        ‚|r#t          ‰‰ j        ¦  «        r‰j        r‰j        S |s‰}‰                     ¦   «         Š‰                      ‰                      ‰d¦  «        ‰ j	        z  ¦  «        }‰j         }dg|dz
  z  }t          |dz
  ¦  «        D �]Y}d}	t          ||¦  «        D ]‹Š‰                      ˆˆ ˆfd„t          ||¦  «        D ¦   «         ¦  «        }
‰                      |
¦  «        |k    rt          d¦  «        ‚d|
z  ‰                      ‰‰|f         ¦  «        z  }||	k    r|}	‰||<   ŒŒ‰                      ‰|||         ¦  «         ‰                      ‰||f         ¦  «        |k    rt          d¦  «        ‚t          |dz   |¦  «        D ]W}‰||fxx         ‰||f         z  cc<   t          |dz   |¦  «        D ]'Š‰|‰fxx         ‰||f         ‰|‰f         z  z  cc<   Œ(ŒX�Œ[‰                      ‰|dz
  |dz
  f         ¦  «        |k    rt          d¦  «        ‚|st          |‰ j        ¦  «        r	‰|f|_        ‰|fS )zØ
        LU-factorization of a n*n matrix using the Gauss algorithm.
        Returns L and U in one matrix and the pivot indices.

        Use overwrite to specify whether A will be overwritten with L and U.
        úneed n*n matrixé   Nr   c                 óJ   •— g | ]}‰                      ‰‰|f         ¦  «        ‘Œ S © )Úabsmin)Ú.0ÚlÚAÚctxÚks     €€€úT/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/mpmath/matrices/linalg.pyú
<listcomp>z2LinearAlgebraMethods.LU_decomp.<locals>.<listcomp>„   s-   ø€ ÐGÐGÐG°Q˜cŸjšj¨¨1¨Q¨3¬Ñ0Ô0ÐGÐGÐGó    úmatrix is numerically singular)ÚrowsÚcolsÚ
ValueErrorÚ
isinstanceÚmatrixÚ_LUr   r   ÚmnormÚepsr   ÚfsumÚZeroDivisionErrorÚswap_row)r   r   Ú	overwriteÚ	use_cacheÚorigÚtolÚnÚpÚjÚbiggestÚsÚcurrentÚir   s   ``           @r   Ú	LU_decompzLinearAlgebraMethods.LU_decompn   s²  øøø€ ð Œv˜œÒÐÝÐ.Ñ/Ô/Ð/àð 	� A s¤zÑ2Ô2ð 	°q´uð 	Ø”5ˆLØð 	ØˆDØ—’‘”ˆAØ�jŠj˜Ÿš 1 Q™œ¨#¬'Ñ1Ñ2Ô2ˆØŒFˆØˆF�A˜‘E‰NˆÝ˜˜A™‘”ð 	,ñ 	,ˆAàˆGÝ˜A˜q‘\”\ð ð �Ø—H’HÐGÐGÐGÐGÐGÐG½&ÀÀA¹,¼,ÐGÑGÔGÑHÔH�Ø—:’:˜a‘=”= CÒ'Ð'Ý+Ð,LÑMÔMÐMØ˜A™# §
¢
¨1¨Q¨q¨S¬6Ñ 2Ô 2Ñ2�Ø˜WÒ$Ð$Ø%�GØ�A�a‘Døà�LŠL˜˜A˜q œtÑ$Ô$Ð$Ø�zŠz˜!˜A˜a˜Cœ&Ñ!Ô! SÒ(Ð(Ý'Ð(HÑIÔIÐIå˜A ™E 1Ñ%Ô%ð ,ð ,�Ø�!�A�#��”˜!˜A˜a˜Cœ&Ñ ��‘Ý  A¡ qÑ)Ô)ð ,ð ,�AØ�a˜�c�F�F”F˜a  ! œf Q q¨ s¤V™mÑ+�F�F‘F�Fð,ñ,ð �:Š:�a˜˜A™˜a !™e˜”nÑ%Ô%¨Ò,Ð,Ý#Ð$DÑEÔEÐEàð 	�Z¨¨c¬jÑ9Ô9ð 	Ø˜1�vˆDŒHØ�!ˆtˆr   Nc                 ó¾  — |j         |j        k    rt          d¦  «        ‚|j         }t          |¦  «        |k    rt	          d¦  «        ‚t          |¦  «        }|r=t          dt          |¦  «        ¦  «        D ]}|                      ||||         ¦  «         Œ t          d|¦  «        D ]5}t          |¦  «        D ]#}||xx         |||f         ||         z  z  cc<   Œ$Œ6|S )zG
        Solve the lower part of a LU factorized matrix for y.
        r	   úValue should be equal to nr   r
   )r   r   ÚRuntimeErrorÚlenr   r   r   r!   )r   ÚLÚbr'   r&   r   r,   r(   s           r   ÚL_solvezLinearAlgebraMethods.L_solve›   sô   € ð Œ6�Q”VÒÐÝÐ0Ñ1Ô1Ð1ØŒFˆÝˆq‰6Œ6�QŠ;ˆ;ÝÐ9Ñ:Ô:Ð:Ý�‰GŒGˆØð 	)Ý˜A�s 1™vœvÑ&Ô&ð )ð )�Ø—’˜Q  1 Q¤4Ñ(Ô(Ð(Ð(å˜˜1‘”ð 	&ð 	&ˆAÝ˜A‘Y”Yð &ð &�Ø�!��”˜˜!˜A˜#œ  1¤™Ñ%��‘�ð&àˆr   c                 ó€  — |j         |j        k    rt          d¦  «        ‚|j         }t          |¦  «        |k    rt	          d¦  «        ‚t          |¦  «        }t          |dz
  dd¦  «        D ]Q}t          |dz   |¦  «        D ]#}||xx         |||f         ||         z  z  cc<   Œ$||xx         |||f         z  cc<   ŒR|S )zG
        Solve the upper part of a LU factorized matrix for x.
        r	   r/   r
   éÿÿÿÿ)r   r   r0   r1   r   r   r   )r   ÚUÚyr&   Úxr,   r(   s          r   ÚU_solvezLinearAlgebraMethods.U_solve®   sÚ   € ð Œ6�Q”VÒÐÝÐ0Ñ1Ô1Ð1ØŒFˆÝˆq‰6Œ6�QŠ;ˆ;ÝÐ9Ñ:Ô:Ð:Ý�‰GŒGˆÝ˜˜A™˜r 2Ñ&Ô&ð 	ð 	ˆAÝ˜A ™E 1Ñ%Ô%ð &ð &�Ø�!��”˜˜!˜A˜#œ  1¤™Ñ%��‘�ØˆaˆDˆDŒD�A�a˜�c”F‰NˆDˆD‰DˆDØˆr   c                 ó¨  ‡ — ‰ j         }	 ‰ xj         dz  c_          ‰ j        |fi |¤Ž                     ¦   «          ‰ j        |fi |¤Ž                     ¦   «         }}|j        |j        k     rt          d¦  «        ‚|j        |j        k    rp|j        }||z  }||z  }|                     dd¦  «        st          ˆ fd„|D ¦   «         ¦  «        s‰  	                    ||¦  «        }n\‰  
                    ||¦  «        }nE‰                      |¦  «        \  }}‰                      |||¦  «        }‰                      ||¦  «        }|‰ _         n# |‰ _         w xY w|S )aÑ  
        Ax = b => x

        Solve a determined or overdetermined linear equations system.
        Fast LU decomposition is used, which is less accurate than QR decomposition
        (especially for overdetermined systems), but it's twice as efficient.
        Use qr_solve if you want more precision or have to solve a very ill-
        conditioned system.

        If you specify real=True, it does not check for overdeterminded complex
        systems.
        é
   ú#cannot solve underdetermined systemÚrealFc              3   óD   •K  — | ]}t          |¦  «        ‰j        u V — Œd S ©N©ÚtypeÚmpc)r   r,   r   s     €r   ú	<genexpr>z0LinearAlgebraMethods.lu_solve.<locals>.<genexpr>Ù   s0   øè è € Ð:Ð:°1�D ™GœG s¤wÐ.Ð:Ð:Ð:Ð:Ð:Ð:r   )Úprecr   r   r   r   r   ÚHÚgetÚsumÚcholesky_solveÚlu_solver-   r4   r:   )r   r   r3   ÚkwargsrE   ÚAHr9   r'   s   `       r   rJ   zLinearAlgebraMethods.lu_solve¾   sr  ø€ ð Œxˆð	ØˆHŒH˜‰NˆHŒHà�3”:˜aÐ*Ð* 6Ð*Ð*×/Ò/Ñ1Ô1°:°3´:¸aÐ3JÐ3JÀ6Ð3JÐ3J×3OÒ3OÑ3QÔ3QˆqˆAØŒv˜œŠˆÝ Ð!FÑGÔGÐGØŒv˜œŠˆð ”S�Ø˜‘F�Ø˜‘F�Ø—J’J˜v uÑ-Ô-ð +ÝÐ:Ð:Ð:Ð:¸Ð:Ñ:Ô:Ñ:Ô:ð+ð ×*Ò*¨1¨aÑ0Ô0�A�AàŸš Q¨Ñ*Ô*�A�Að —}’} QÑ'Ô'‘��1Ø—K’K  1 aÑ(Ô(�Ø—K’K  1Ñ%Ô%�àˆCŒHˆHø�tˆCŒHˆOˆOˆOˆOØˆs   ŠD4E Å	Er
   c                 ó  — |j         |j        k    rt          d¦  «        ‚t          |¦  «        D ]Y}|                      |||¦  «        }|                      |d¦  «        d| j        z  k     r n|                      || ¦  «        }||z  }ŒZ|S )zÔ
        Improve a solution to a linear equation system iteratively.

        This re-uses the LU decomposition and is thus cheap.
        Usually 3 up to 4 iterations are giving the maximal improvement.
        r	   r   r<   )r   r   r0   r   ÚresidualÚnormr   rJ   )r   r   r9   r3   ÚmaxstepsÚ_ÚrÚdxs           r   Úimprove_solutionz%LinearAlgebraMethods.improve_solutionç   s•   € ð Œ6�Q”VÒÐÝÐ0Ñ1Ô1Ð1Ý˜Ñ!Ô!ð 	ð 	ˆAØ—’˜Q  1Ñ%Ô%ˆAØ�xŠx˜˜1‰~Œ~  3¤7¡
Ò*Ð*Ø�à—’˜a ! Ñ$Ô$ˆBØ�‰GˆAˆAØˆr   c                 ó  — |                       |¦  «        \  }}|j        }|                      |¦  «        }|                      |¦  «        }t          |¦  «        D ]V}t          |¦  «        D ]D}||k    r|||f         |||f<   Œ||k    rd|||f<   |||f         |||f<   Œ5|||f         |||f<   ŒEŒW|                      |¦  «        }t          t          |¦  «        ¦  «        D ]}	|                      ||	||	         ¦  «         Œ |||fS )a7  
        A -> P, L, U

        LU factorisation of a square matrix A. L is the lower, U the upper part.
        P is the permutation matrix indicating the row swaps.

        P*A = L*U

        If you need efficiency, use the low-level method LU_decomp instead, it's
        much more memory efficient.
        r
   )r-   r   r   r   Úeyer1   r!   )
r   r   r'   r&   r2   r7   r,   r(   ÚPr   s
             r   ÚluzLinearAlgebraMethods.luù   s%  € ð �}Š}˜QÑÔ‰ˆˆ1ØŒFˆØ�JŠJ�q‰MŒMˆØ�JŠJ�q‰MŒMˆÝ˜‘”ð 	$ð 	$ˆAÝ˜A‘Y”Yð $ð $�Ø�q’5�5Ø˜q ˜sœV�A�a˜�c‘F�FØ˜!’V�VØ�A�a˜�c‘FØ˜q ˜sœV�A�a˜�c‘F�Fà˜q ˜sœV�A�a˜�c‘F�Fð$ð �GŠG�A‰JŒJˆÝ�˜A™œ‘”ð 	%ð 	%ˆAØ�LŠL˜˜A˜q œtÑ$Ô$Ð$Ð$Ø�!�Qˆwˆr   c                 ó€   — d|cxk     r|k    sn J d¦   «         ‚| j         g|dz
  z  | j        gz   | j         g||z
  z  z   S )z<
        Return the i-th n-dimensional unit vector.
        r   zthis unit vector does not existr
   )ÚzeroÚone)r   r&   r,   s      r   Ú
unitvectorzLinearAlgebraMethods.unitvector  sT   € ð �1ˆzˆzŠzˆz˜ŠzˆzˆzˆzˆzÐ<‰zŒzˆzØ”ˆz˜1˜Q™3Ñ 3¤7 )Ñ+¨s¬x¨j¸!¸A¹#Ñ.>Ñ>Ð>r   c                 ó�  — | j         }	 | xj         dz  c_          | j        |fi |¤Ž                     ¦   «         }|j        }|                      |¦  «        \  }}g }t          d|dz   ¦  «        D ]X}|                      ||¦  «        }|                      |||¦  «        }	|                     |  	                    ||	¦  «        ¦  «         ŒYg }
t          |¦  «        D ]L}g }t          |¦  «        D ]#}|                     ||         |         ¦  «         Œ$|
                     |¦  «         ŒM | j        |
fi |¤Ž}|| _         n# || _         w xY w|S )zÅ
        Calculate the inverse of a matrix.

        If you want to solve an equation system Ax = b, it's recommended to use
        solve(A, b) instead, it's about 3 times more efficient.
        r<   r
   )
rE   r   r   r   r-   r   r\   r4   Úappendr:   )r   r   rK   rE   r&   r'   r   r,   Úer8   ÚinvÚrowr(   Úresults                 r   ÚinversezLinearAlgebraMethods.inverse   se  € ð Œxˆð	ØˆHŒH˜‰NˆHŒHà�”
˜1Ð'Ð' Ð'Ð'×,Ò,Ñ.Ô.ˆAØ”ˆAà—=’= Ñ#Ô#‰DˆAˆqØˆDå˜A˜q 1™uÑ%Ô%ð /ð /�Ø—N’N 1 aÑ(Ô(�Ø—K’K  1 aÑ(Ô(�Ø—’˜CŸKšK¨¨1Ñ-Ô-Ñ.Ô.Ð.Ð.àˆCÝ˜A‘Y”Yð  ð  �Ø�Ý ™œð +ð +�AØ—J’J˜t Aœw qœzÑ*Ô*Ð*Ð*Ø—
’
˜3‘”��Ø�S”Z Ð.Ð. vÐ.Ð.ˆFàˆCŒHˆHø�tˆCŒHˆOˆOˆOˆOØˆs   ‰D)D: Ä:	Ec                 ó2  ‡ ‡‡‡‡	‡
‡‡— t          ‰‰ j        ¦  «        st          d¦  «        ‚‰j        Š
‰j        Š‰
‰dz
  k     rt          d¦  «        ‚g }t          d‰dz
  ¦  «        D �]eŠ‰                      ˆˆfd„t          ‰‰
¦  «        D ¦   «         ¦  «        }t          |¦  «        ‰ j	        k    st          d¦  «        ‚|                     ‰                      ‰                      ‰‰‰f         ¦  «        ¦  «         ‰                      |¦  «        z  ¦  «         ‰ j        ||‰         ‰‰‰f         z  z
  z  }‰‰‰fxx         |‰         z  cc<   t          ‰dz   ‰¦  «        D ]gŠ	‰                      ˆˆ ˆˆ	fd„t          ‰‰
¦  «        D ¦   «         ¦  «        |z  }t          ‰‰
¦  «        D ]Š‰‰‰	fxx         ‰‰‰f         |z  z  cc<   Œ Œh�Œgˆˆfd„t          ‰dz
  ¦  «        D ¦   «         Št          ‰d	z
  d
d
¦  «        D ]]Š‰‰xx         ‰                      ˆˆˆfd„t          ‰dz   ‰dz
  ¦  «        D ¦   «         ¦  «        z  cc<   ‰‰xx         |‰         z  cc<   Œ^‰
‰dz
  k    s$ˆˆ
ˆfd„t          ‰
‰z
  dz   ¦  «        D ¦   «         }ndg‰
z  }‰|‰|fS )a  
        (A|b) -> H, p, x, res

        (A|b) is the coefficient matrix with left hand side of an optionally
        overdetermined linear equation system.
        H and p contain all information about the transformation matrices.
        x is the solution, res the residual.
        ú A should be a type of ctx.matrixr
   z$Columns should not be less than rowsr   c              3   óL   •K  — | ]}t          ‰|‰f         ¦  «        d z  V — ŒdS ©r   N)Úabs©r   r,   r   r(   s     €€r   rD   z3LinearAlgebraMethods.householder.<locals>.<genexpr>S  s5   øè è € Ð>Ð>¨A�˜Q˜q ˜sœV™œ a™Ð>Ð>Ð>Ð>Ð>Ð>r   r   c              3   óh   •K  — | ],}‰                      ‰|‰f         ¦  «        ‰|‰f         z  V — Œ-d S r@   ©Úconj©r   r,   r   r   r(   r   s     €€€€r   rD   z3LinearAlgebraMethods.householder.<locals>.<genexpr>Z  sD   øè è € ÐMÐM¸1˜SŸXšX a¨¨!¨¤fÑ-Ô-°°!°A°#´Ñ6ÐMÐMÐMÐMÐMÐMr   c                 ó*   •— g | ]}‰|‰d z
  f         ‘ŒS ©r
   r   )r   r,   r   r&   s     €€r   r   z4LinearAlgebraMethods.householder.<locals>.<listcomp>^  s%   ø€ Ð/Ð/Ð/˜AˆQˆq��Q‘ˆwŒZÐ/Ð/Ð/r   r   r6   c              3   ó>   •K  — | ]}‰‰|f         ‰|         z  V — Œd S r@   r   )r   r(   r   r,   r9   s     €€€r   rD   z3LinearAlgebraMethods.householder.<locals>.<genexpr>`  s3   øè è € ÐIÐI¨q˜Q˜q ˜sœV a¨¤d™]ÐIÐIÐIÐIÐIÐIr   c                 ó6   •— g | ]}‰‰d z
  |z
  ‰d z
  f         ‘ŒS ro   r   )r   r,   r   Úmr&   s     €€€r   r   z4LinearAlgebraMethods.householder.<locals>.<listcomp>d  s-   ø€ Ð:Ð:Ð: 1��1�Q‘3�q‘5˜!˜A™#�:”Ð:Ð:Ð:r   )r   r   Ú	TypeErrorr   r   r0   r   r   rh   r   r   r^   ÚsignÚreÚsqrtr[   )r   r   r'   r*   Úkappar8   rR   r,   r(   r   rr   r&   r9   s   ``     @@@@@@r   Úhouseholderz LinearAlgebraMethods.householderA  sú  øøøøøøøø€ õ ˜!˜SœZÑ(Ô(ð 	@ÝÐ>Ñ?Ô?Ð?ØŒFˆØŒFˆØˆq�1‰uŠ9ˆ9ÝÐEÑFÔFÐFàˆÝ˜˜1˜q™5Ñ!Ô!ð 
	)ñ 
	)ˆAØ—’Ð>Ð>Ð>Ð>Ð>µ¸¸1±´Ð>Ñ>Ô>Ñ>Ô>ˆAÝ�q‘6”6˜CœGÒ#Ð#Ý Ð!AÑBÔBÐBØ�HŠH�c—h’h˜sŸvšv a¨¨!¨¤f™~œ~Ñ.Ô.Ð.°·²¸!±´Ñ<Ñ=Ô=Ð=Ø”G˜q 1 Q¤4¨!¨A¨a¨C¬&¡=Ñ0Ñ1ˆEØˆa�ˆcˆFˆFŒF�a˜”d‰NˆFˆF‰FÝ˜A˜a™C ‘^”^ð )ð )�Ø—H’HÐMÐMÐMÐMÐMÐMÐMÅÀqÈ!ÁÄÐMÑMÔMÑMÔMÐPUÑU�Ý  1™œð )ð )�AØ�a˜�c�F�F”F˜a  ! œf q™jÑ(�F�F‘F�Fð)ñ)ð
 0Ð/Ð/Ð/Ð/¥¨¨A©¡¤Ð/Ñ/Ô/ˆÝ˜˜A™˜r 2Ñ&Ô&ð 	ð 	ˆAØˆaˆDˆDŒD�C—H’HÐIÐIÐIÐIÐIÐIµF¸1¸q¹5À!ÀaÁ%Ñ4HÔ4HÐIÑIÔIÑIÔIÑIˆDˆD‰DØˆaˆDˆDŒD�A�a”D‰LˆDˆD‰DˆDà�A˜‘EŠzˆzØ:Ð:Ð:Ð:Ð:Ð:­¨q°1©u°q©yÑ(9Ô(9Ð:Ñ:Ô:ˆAˆAð ��A‘ˆAØ�!�Q˜ˆzÐr   c                 ó¼   — | j         }	 | xj         dz  c_          | j        |fi |¤Ž | j        |fi |¤Ž | j        |fi |¤Ž}}}||z  |z
  || _         S # || _         w xY w)zt
        Calculate the residual of a solution to a linear equation system.

        r = A*x - b for A*x = b
        r   )rE   r   )r   r   r9   r3   rK   Úoldprecs         r   rN   zLinearAlgebraMethods.residualv  s‘   € ð ”(ˆð	ØˆHŒH˜‰MˆHŒHØ �c”j Ð-Ð- fÐ-Ð-¨z¨s¬z¸!Ð/FÐ/F¸vÐ/FÐ/FÈ
ÈÌ
ÐSTÐH_ÐH_ÐX^ÐH_ÐH_�!ˆqˆAØ�Q‘3˜‘7àˆCŒHˆHø�wˆCŒHÐÐÐÐs   ‰AA Á	Ac                 ó.  — |€| j         }| j        }	 | xj        dz  c_         | j        |fi |¤Ž                     ¦   «          | j        |fi |¤Ž                     ¦   «         }}|j        |j        k     rt          d¦  «        ‚|                      |                      ||¦  «        ¦  «        \  }}}}	|                       |	¦  «        }
|
dk    r*|                       |  	                    |||¦  «        ¦  «        }
 | j        |fi |¤Ž|
f|| _        S # || _        w xY w)aa  
        Ax = b => x, ||Ax - b||

        Solve a determined or overdetermined linear equations system and
        calculate the norm of the residual (error).
        QR decomposition using Householder factorization is applied, which gives very
        accurate results even for ill-conditioned matrices. qr_solve is twice as
        efficient.
        Nr<   r=   r   )
rO   rE   r   r   r   r   r   rx   ÚextendrN   )r   r   r3   rO   rK   rE   rF   r'   r9   rR   Úress              r   Úqr_solvezLinearAlgebraMethods.qr_solve„  s$  € ð ˆ<Ø”8ˆDØŒxˆð	ØˆHŒH˜‰NˆHŒHà�3”:˜aÐ*Ð* 6Ð*Ð*×/Ò/Ñ1Ô1°:°3´:¸aÐ3JÐ3JÀ6Ð3JÐ3J×3OÒ3OÑ3QÔ3QˆqˆAØŒv˜œŠˆÝ Ð!FÑGÔGÐGØŸš¨¯ª°A°qÑ)9Ô)9Ñ:Ô:‰JˆAˆq�!�QØ—(’(˜1‘+”+ˆCà�aŠxˆxØ—h’h˜sŸ|š|¨A¨q°!Ñ4Ô4Ñ5Ô5�Ø�3”:˜aÐ*Ð* 6Ð*Ð*¨CÐ/àˆCŒHˆHø�tˆCŒHˆOˆOˆOˆOs   ’C1D Ä	Dc                 ób  ‡	‡
‡— t          || j        ¦  «        st          d¦  «        ‚|j        |j        k    st          d¦  «        ‚|€| j        
 }|j        }|                      |¦  «        Š	t          |¦  «        D �]1Š|                      |‰‰f         ¦  «        }t          ||‰‰f         z
  ¦  «        |k    rt          d¦  «        ‚||  
                    ˆ	ˆfd„t          ‰¦  «        D ¦   «         dd¬¦  «        z
  }||k     rt          d¦  «        ‚|                      |¦  «        ‰	‰‰f<   t          ‰|¦  «        D ]oŠ
ˆ	ˆ
fd	„t          ‰¦  «        D ¦   «         }ˆ	ˆfd
„t          ‰¦  «        D ¦   «         }|                      ||d¬¦  «        }|‰
‰f         |z
  ‰	‰‰f         z  ‰	‰
‰f<   Œp�Œ3‰	S )a}  
        Cholesky decomposition of a symmetric positive-definite matrix `A`.
        Returns a lower triangular matrix `L` such that `A = L \times L^T`.
        More generally, for a complex Hermitian positive-definite matrix,
        a Cholesky decomposition satisfying `A = L \times L^H` is returned.

        The Cholesky decomposition can be used to solve linear equation
        systems twice as efficiently as LU decomposition, or to
        test whether `A` is positive-definite.

        The optional parameter ``tol`` determines the tolerance for
        verifying positive-definiteness.

        **Examples**

        Cholesky decomposition of a positive-definite symmetric matrix::

            >>> from mpmath import *
            >>> mp.dps = 25; mp.pretty = True
            >>> A = eye(3) + hilbert(3)
            >>> nprint(A)
            [     2.0      0.5  0.333333]
            [     0.5  1.33333      0.25]
            [0.333333     0.25       1.2]
            >>> L = cholesky(A)
            >>> nprint(L)
            [ 1.41421      0.0      0.0]
            [0.353553  1.09924      0.0]
            [0.235702  0.15162  1.05899]
            >>> chop(A - L*L.T)
            [0.0  0.0  0.0]
            [0.0  0.0  0.0]
            [0.0  0.0  0.0]

        Cholesky decomposition of a Hermitian matrix::

            >>> A = eye(3) + matrix([[0,0.25j,-0.5j],[-0.25j,0,0],[0.5j,0,0]])
            >>> L = cholesky(A)
            >>> nprint(L)
            [          1.0                0.0                0.0]
            [(0.0 - 0.25j)  (0.968246 + 0.0j)                0.0]
            [ (0.0 + 0.5j)  (0.129099 + 0.0j)  (0.856349 + 0.0j)]
            >>> chop(A - L*L.H)
            [0.0  0.0  0.0]
            [0.0  0.0  0.0]
            [0.0  0.0  0.0]

        Attempted Cholesky decomposition of a matrix that is not positive
        definite::

            >>> A = -eye(3) + hilbert(3)
            >>> L = cholesky(A)
            Traceback (most recent call last):
              ...
            ValueError: matrix is not positive-definite

        **References**

        1. [Wikipedia]_ http://en.wikipedia.org/wiki/Cholesky_decomposition

        re   r	   Nzmatrix is not Hermitianc              3   ó,   •K  — | ]}‰‰|f         V — Œd S r@   r   ©r   r   r2   r(   s     €€r   rD   z0LinearAlgebraMethods.cholesky.<locals>.<genexpr>ê  s+   øè è € Ð8Ð8¨˜a  ! œfÐ8Ð8Ð8Ð8Ð8Ð8r   T)ÚabsoluteÚsquaredzmatrix is not positive-definitec              3   ó,   •K  — | ]}‰‰|f         V — Œd S r@   r   )r   r   r2   r,   s     €€r   rD   z0LinearAlgebraMethods.cholesky.<locals>.<genexpr>ð  ó+   øè è € Ð1Ð1 !�q˜˜1˜”vÐ1Ð1Ð1Ð1Ð1Ð1r   c              3   ó,   •K  — | ]}‰‰|f         V — Œd S r@   r   r�   s     €€r   rD   z0LinearAlgebraMethods.cholesky.<locals>.<genexpr>ñ  r…   r   )Ú	conjugate)r   r   r0   r   r   r   r   r   ru   rh   r   rv   Úfdot)r   r   r%   r&   Úcr*   Úit1Úit2Útr2   r,   r(   s            @@@r   ÚcholeskyzLinearAlgebraMethods.cholesky   sß  øøø€ õ| ˜!˜SœZÑ(Ô(ð 	CÝÐAÑBÔBÐBØŒv˜œÒÐÝÐ.Ñ/Ô/Ð/Øˆ;Ø”7�(ˆCØŒFˆØ�JŠJ�q‰MŒMˆÝ˜‘”ð 	/ñ 	/ˆAØ—’�q˜˜1˜”v‘”ˆAÝ�1�Q�q˜�s”V‘8‰}Œ}˜sÒ"Ð"Ý Ð!:Ñ;Ô;Ð;Ø�C—H’HÐ8Ð8Ð8Ð8Ð8­f°Q©i¬iÐ8Ñ8Ô8Ø tð ñ -ô -ñ -ˆAà�3ŠwˆwÝ Ð!BÑCÔCÐCØ—X’X˜a‘[”[ˆAˆa�ˆc‰FÝ˜A˜q‘\”\ð /ð /�Ø1Ð1Ð1Ð1Ð1¥v¨a¡y¤yÐ1Ñ1Ô1�Ø1Ð1Ð1Ð1Ð1¥v¨a¡y¤yÐ1Ñ1Ô1�Ø—H’H˜S #°�HÑ6Ô6�Ø˜A˜a˜Cœ& 1™*¨¨!¨A¨#¬Ñ.��!�A�#‘�ñ	/ð
 ˆr   c           
      ó¤  ‡‡‡— | j         }	 | xj         dz  c_          | j        |fi |¤Ž                     ¦   «          | j        ‰fi |¤Ž                     ¦   «         c}Š|j        |j        k    rt          d¦  «        ‚|                      |¦  «        Š‰j        }t          ‰¦  «        |k    rt          d¦  «        ‚t          |¦  «        D ]XŠ‰‰xx         |  	                    ˆˆˆfd„t          ‰¦  «        D ¦   «         ¦  «        z  cc<   ‰‰xx         ‰‰‰f         z  cc<   ŒY|  
                    ‰j        ‰¦  «        }||| _         S # || _         w xY w)zø
        Ax = b => x

        Solve a symmetric positive-definite linear equation system.
        This is twice as efficient as lu_solve.

        Typical use cases:
        * A.T*A
        * Hessian matrix
        * differential equations
        r<   z can only solve determined systemr/   c              3   ó>   •K  — | ]}‰‰|f         ‰|         z  V — Œd S r@   r   )r   r(   r2   r3   r,   s     €€€r   rD   z6LinearAlgebraMethods.cholesky_solve.<locals>.<genexpr>  s3   øè è € Ð BÐ B°1  1 Q 3¤¨!¨A¬$¡Ð BÐ BÐ BÐ BÐ BÐ Br   )rE   r   r   r   r   r   r�   r1   r   r   r:   ÚT)	r   r   r3   rK   rE   r&   r9   r2   r,   s	     `    @@r   rI   z#LinearAlgebraMethods.cholesky_solveö  sf  øøø€ ð Œxˆð	ØˆHŒH˜‰NˆHŒHà�3”:˜aÐ*Ð* 6Ð*Ð*×/Ò/Ñ1Ô1°:°3´:¸aÐ3JÐ3JÀ6Ð3JÐ3J×3OÒ3OÑ3QÔ3QˆDˆAˆqØŒv˜!œ&Ò Ð Ý Ð!CÑDÔDÐDà—’˜Q‘”ˆAà”ˆAÝ�1‰vŒv˜Š{ˆ{Ý Ð!=Ñ>Ô>Ð>Ý˜A‘Y”Yð ð �Ø�!��”˜ŸšÐ BÐ BÐ BÐ BÐ BÐ B½¸q¹	¼	Ð BÑ BÔ BÑBÔBÑB��‘Ø�!��”˜˜!˜A˜#œ‘��‘�Ø—’˜AœC Ñ#Ô#ˆAØàˆCŒHˆHø�tˆCŒHˆOˆOˆOˆOs   ŒD2E Å	Ec                 óz  — | j         }	 |                      |¦  «                             ¦   «         }	 |                      |¦  «        \  }}n# t          $ r Y || _         dS w xY wd}t          |¦  «        D ]\  }}||k    r|dz  }Œt          |j        ¦  «        D ]}||||f         z  }Œ||| _         S # || _         w xY w)z8
        Calculate the determinant of a matrix.
        r   r
   r6   )rE   r   r   r-   r    Ú	enumerater   r   )r   r   rE   ÚRr'   Úzr,   r_   s           r   ÚdetzLinearAlgebraMethods.det  sè   € ð Œxˆð	à—
’
˜1‘”×"Ò"Ñ$Ô$ˆAðØ—}’} QÑ'Ô'‘��1�1øÝ$ð ð ð Øð ˆCŒHˆHˆHðøøøàˆAÝ! !™œð ð ‘��1Ø˜’6�6Ø˜‘G�AøÝ˜AœF‘^”^ð ð �Ø�Q�q˜�s”V‘��ØàˆCŒHˆHø�tˆCŒHˆOˆOˆOˆOs/   ‰'B1 ±A
 Á	B1 Á

AÁB1 ÁAÁA
B1 Â1	B:c                 óf   ‡ — |€ˆ fd„} ||¦  «         |‰                       |¦  «        ¦  «        z  S )a)  
        Calculate the condition number of a matrix using a specified matrix norm.

        The condition number estimates the sensitivity of a matrix to errors.
        Example: small input errors for ill-conditioned coefficient matrices
        alter the solution of the system dramatically.

        For ill-conditioned matrices it's recommended to use qr_solve() instead
        of lu_solve(). This does not help with input errors however, it just avoids
        to add additional errors.

        Definition:    cond(A) = ||A|| * ||A**-1||
        Nc                 ó0   •— ‰                      | d¦  «        S )Nr
   )r   )r9   r   s    €r   ú<lambda>z+LinearAlgebraMethods.cond.<locals>.<lambda>=  s   ø€ ˜SŸYšY q¨™^œ^€ r   )rc   )r   r   rO   s   `  r   ÚcondzLinearAlgebraMethods.cond.  s?   ø€ ð ˆ<Ø+Ð+Ð+Ð+ˆDØˆt�A‰wŒw˜˜˜cŸkšk¨!™nœnÑ-Ô-Ñ-Ð-r   c                 ó  — |                       |j        |j        ¦  «        }t          |j        ¦  «        D ]W}|                      ||                     |¦  «        ¦  «        }t          t          |¦  «        ¦  «        D ]}||         |||f<   ŒŒX|S )z,Solve a * x = b  where a and b are matrices.)r   r   r   ÚrangerJ   Úcolumnr1   )r   Úar3   rR   r,   r‰   r(   s          r   Úlu_solve_matz!LinearAlgebraMethods.lu_solve_mat@  s…   € à�JŠJ�q”v˜qœvÑ&Ô&ˆÝ�q”v‘”ð 	ð 	ˆAØ—’˜Q §¢¨¡¤Ñ,Ô,ˆAÝ�3˜q™6œ6‘]”]ð ð �Ø˜Aœ$��!�Q�$‘�ðàˆr   Úfullr<   c           
      ó  ‡ ‡‡‡— t          ‰‰ j        ¦  «        sJ ‚‰j        }‰j        }|dk    sJ ‚||k    sJ ‚|dk    sJ ‚t	          ˆ fd„‰D ¦   «         ¦  «        }‰                      |¦  «        5  ‰                      |d¦  «        }‰                     ¦   «         Š|�rw‰                      dd¦  «        }‰                      dd¦  «        }	‰                      d¦  «        }
t          d|¦  «        D �]"Š‰‰‰f         }‰  
                    |¦  «        }‰                      |¦  «        }|‰z
  dk    r]‰                      ˆˆ ˆfd„t          ‰dz   |¦  «        D ¦   «         ¦  «        }‰  
                    ‰                      |¦  «        ¦  «        }n|
}||
k    r||
k    r|	|‰<   Œ±||
k     r%‰                      |dz  |dz  z   |dz  z   ¦  «        }n%‰                      |dz  |dz  z   |dz  z   ¦  «         }‰                      ||z
  |z  | |z  ¦  «        |‰<   ‰                      |‰         ¦  «         }|||z
  z  }t          ‰dz   |¦  «        D ]}‰|‰fxx         |z  cc<   Œ|‰‰‰f<   t          ‰dz   |¦  «        D ]|Š‰                      ˆˆ ˆˆfd„t          ‰|¦  «        D ¦   «         ¦  «        }|‰                      |¦  «        z  }t          ‰|¦  «        D ]}‰|‰fxx         ‰|‰f         |z  z  cc<   Œ Œ}‰                      |d¦  «        ‰‰‰f<   �Œ$�nß‰                      d¦  «        }‰                      d¦  «        }	t          d|¦  «        D �]£Š‰‰‰f         }|‰z
  dk    rI‰                      ˆˆfd	„t          ‰dz   |¦  «        D ¦   «         ¦  «        }‰                      |¦  «        }n&|‰z
  dk    rt          ‰|dz
  ‰f         ¦  «        }n|	}||	k    r|	|‰<   Œ‘||	k     r‰                      |dz  |dz  z   ¦  «        }n‰                      |dz  |dz  z   ¦  «         }||z
  |z  |‰<   |‰          }|||z
  z  }t          ‰dz   |¦  «        D ]}‰|‰fxx         |z  cc<   Œ|‰‰‰f<   t          ‰dz   |¦  «        D ]hŠ‰                      ˆˆˆfd
„t          ‰|¦  «        D ¦   «         ¦  «        }||z  }t          ‰|¦  «        D ]}‰|‰fxx         ‰|‰f         |z  z  cc<   Œ Œi|‰‰‰f<   �Œ¥|dk    s|dk    r‰|fcddd¦  «         S ‰                     ¦   «         }t          d|¦  «        D ]Št          ‰dz   |¦  «        D ]	}|	||‰f<   Œ
Œ |}|dk    s|dk    r|}‰xj        ||z
  z  c_        t          d|¦  «        D ]#Š|‰‰‰f<   t          d‰¦  «        D ]	}|	‰|‰f<   Œ
Œ$t          |dz
  dd¦  «        D �]Š|‰          }‰‰‰fxx         |z  cc<   t          ‰dz   |¦  «        D ]ÅŠ|rN‰                      ˆˆ ˆˆfd„t          ‰dz   |¦  «        D ¦   «         ¦  «        }|‰                      |¦  «        z  }n9‰                      ˆˆˆfd„t          ‰dz   |¦  «        D ¦   «         ¦  «        }||z  }|‰‰‰f<   t          ‰dz   |¦  «        D ]}‰|‰fxx         ‰|‰f         |z  z  cc<   Œ ŒÆt          ‰dz   |¦  «        D ]}‰|‰fxx         |z  cc<   Œ�Œ!‰|d|…d|…f         fcddd¦  «         S # 1 swxY w Y   dS )al  
        Compute a QR factorization $A = QR$ where
        A is an m x n matrix of real or complex numbers where m >= n

        mode has following meanings:
        (1) mode = 'raw' returns two matrixes (A, tau) in the
            internal format used by LAPACK
        (2) mode = 'skinny' returns the leading n columns of Q
            and n rows of R
        (3) Any other value returns the leading m columns of Q
            and m rows of R

        edps is the increase in mp precision used for calculations

        **Examples**

            >>> from mpmath import *
            >>> mp.dps = 15
            >>> mp.pretty = True
            >>> A = matrix([[1, 2], [3, 4], [1, 1]])
            >>> Q, R = qr(A)
            >>> Q
            [-0.301511344577764   0.861640436855329   0.408248290463863]
            [-0.904534033733291  -0.123091490979333  -0.408248290463863]
            [-0.301511344577764  -0.492365963917331   0.816496580927726]
            >>> R
            [-3.3166247903554  -4.52267016866645]
            [             0.0  0.738548945875996]
            [             0.0                0.0]
            >>> Q * R
            [1.0  2.0]
            [3.0  4.0]
            [1.0  1.0]
            >>> chop(Q.T * Q)
            [1.0  0.0  0.0]
            [0.0  1.0  0.0]
            [0.0  0.0  1.0]
            >>> B = matrix([[1+0j, 2-3j], [3+j, 4+5j]])
            >>> Q, R = qr(B)
            >>> nprint(Q)
            [     (-0.301511 + 0.0j)   (0.0695795 - 0.95092j)]
            [(-0.904534 - 0.301511j)  (-0.115966 + 0.278318j)]
            >>> nprint(R)
            [(-3.31662 + 0.0j)  (-5.72872 - 2.41209j)]
            [              0.0       (3.91965 + 0.0j)]
            >>> Q * R
            [(1.0 + 0.0j)  (2.0 - 3.0j)]
            [(3.0 + 1.0j)  (4.0 + 5.0j)]
            >>> chop(Q.T * Q.conjugate())
            [1.0  0.0]
            [0.0  1.0]

        r   c              3   óD   •K  — | ]}t          |¦  «        ‰j        u V — Œd S r@   rA   )r   r9   r   s     €r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>‰  s0   øè è € Ð2Ð2¨1•D˜‘G”G˜sœwÐ&Ð2Ð2Ð2Ð2Ð2Ð2r   r
   z1.0z0.0r   c              3   óh   •K  — | ],}‰|‰f         ‰                      ‰|‰f         ¦  «        z  V — Œ-d S r@   rk   )r   r,   r   r   r(   s     €€€r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>Ÿ  sD   øè è € Ð([Ð([Àa¨!¨A¨a¨C¬&°·²¸!¸A¸a¸C¼&Ñ1AÔ1AÑ*AÐ([Ð([Ð([Ð([Ð([Ð([r   c              3   óh   •K  — | ],}‰|‰f         ‰                      ‰|‰f         ¦  «        z  V — Œ-d S r@   rk   rm   s     €€€€r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>¶  sD   øè è € Ð$UÐ$UÀ1 Q q¨ s¤V¨c¯hªh°q¸¸1¸´vÑ.>Ô.>Ñ%>Ð$UÐ$UÐ$UÐ$UÐ$UÐ$Ur   c              3   ó2   •K  — | ]}‰|‰f         d z  V — ŒdS rg   r   ri   s     €€r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>Å  s/   øè è € Ð(OÐ(O¸!¨1¨Q¨q¨S¬6°A©+Ð(OÐ(OÐ(OÐ(OÐ(OÐ(Or   c              3   óB   •K  — | ]}‰|‰f         ‰|‰f         z  V — Œd S r@   r   ©r   r,   r   r(   r   s     €€€r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>Þ  s7   øè è € Ð$MÐ$M¸! a¨¨!¨¤f¨q°°1°¬v¡oÐ$MÐ$MÐ$MÐ$MÐ$MÐ$Mr   ÚrawÚRAWNÚskinnyÚSKINNYr6   c              3   óh   •K  — | ],}‰|‰f         ‰                      ‰|‰f         ¦  «        z  V — Œ-d S r@   rk   rm   s     €€€€r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>  sD   øè è € Ð$WÐ$WÀ1 Q q¨ s¤V¨c¯hªh°q¸¸1¸´vÑ.>Ô.>Ñ%>Ð$WÐ$WÐ$WÐ$WÐ$WÐ$Wr   c              3   óB   •K  — | ]}‰|‰f         ‰|‰f         z  V — Œd S r@   r   r¦   s     €€€r   rD   z*LinearAlgebraMethods.qr.<locals>.<genexpr>	  s7   øè è € Ð$MÐ$M¸ Q q¨ s¤V¨a°°!°¬f¡_Ð$MÐ$MÐ$MÐ$MÐ$MÐ$Mr   )r   r   r   r   ÚanyÚextradpsr   rC   Úmpfr   ru   Úimr   rv   rl   rh   )r   r   ÚmodeÚedpsrr   r&   ÚcmplxÚtaur[   rZ   ÚrzeroÚalphaÚalphrÚalphiÚxnormÚbetarŒ   Úzar,   r8   ÚtempÚdar“   r'   r(   r   s   ``                      @@r   ÚqrzLinearAlgebraMethods.qrI  sö  øøøø€ õp ˜!˜SœZÑ(Ô(Ð(Ð(Ð(ØŒFˆØŒFˆØ�AŠvˆvˆvˆvØ�AŠvˆvˆvˆvØ�qŠyˆyˆyˆyõ Ð2Ð2Ð2Ð2°Ð2Ñ2Ô2Ñ2Ô2ˆð �\Š\˜$ÑÔð F	!ð F	!Ø—*’*˜Q˜q‘/”/ˆCØ—’‘”ˆAð
 ñ P"Ø—g’g˜e UÑ+Ô+�Ø—w’w˜u eÑ,Ô,�ØŸš ™œ�õ    1™œð "2ñ "2�AØ˜a ˜cœF�EØŸFšF 5™MœM�EØŸFšF 5™MœM�Eà˜!™ ’z�zØ #§¢Ð([Ð([Ð([Ð([Ð([Ð([Í6ÐRSÐTUÑRUÐWXÉ>Ì>Ð([Ñ([Ô([Ñ [Ô [˜Ø #§¢¨¯ª°©¬Ñ 9Ô 9˜˜à %˜à š˜¨U°eª^¨^Ø!%˜˜A™Ø à˜u’}�}Ø"Ÿxšx¨¨q©°5¸!±8Ñ(;¸eÀQ¹hÑ(FÑGÔG˜˜à #§¢¨°©°E¸1±HÑ)<¸uÀa¹xÑ)GÑ HÔ HÐH˜à ŸWšW t¨e¡|°tÑ&;¸e¸VÀd¹]ÑLÔL�C˜‘FØŸš # a¤&Ñ)Ô)Ð)�AØ ¨¡Ñ-�Bå# A a¡C¨™^œ^ð %ð %˜Ø˜!˜A˜#˜˜œ "™˜˜™˜à �A�a˜�c‘FÝ# A a¡C¨™^œ^ð 4ð 4˜ØŸHšHÐ$UÐ$UÐ$UÐ$UÐ$UÐ$UÐ$UÍÈqÐRSÉÌÐ$UÑ$UÔ$UÑUÔU˜Ø  3§8¢8¨A¡;¤;™˜Ý!'¨¨1¡¤ð 4ð 4˜AØ˜a ˜c˜F˜FœF a¨¨!¨¤f¨t¡mÑ3˜F˜F™F˜Fð4ð !ŸWšW T¨5Ñ1Ô1�A�a˜�c‘F‘FñE"2ðH —g’g˜e‘n”n�Ø—w’w˜u‘~”~�õ    1™œð ""ñ ""�AØ˜a ˜cœF�Eà˜!™˜q’y�yØ #§¢Ð(OÐ(OÐ(OÐ(OÐ(O½vÀaÈÁcÈ1¹~¼~Ð(OÑ(OÔ(OÑ OÔ O˜Ø #§¢¨¡¤˜˜Ø˜A™# !š˜Ý # Q q¨¡s¨1 u¤X¡¤˜˜à $˜à ’}�}Ø!%˜˜A™Ø à˜t’|�|Ø"Ÿxšx¨¨q©°5¸!±8Ñ(;Ñ<Ô<˜˜à #§¢¨°©°E¸1±HÑ)<Ñ =Ô =Ð=˜à" U™l¨dÑ2�C˜‘FØ˜Qœ˜�AØ ¨¡Ñ-�Bå# A a¡C¨™^œ^ð %ð %˜Ø˜!˜A˜#˜˜œ "™˜˜™˜à �A�a˜�c‘FÝ# A a¡C¨™^œ^ð 4ð 4˜ØŸHšHÐ$MÐ$MÐ$MÐ$MÐ$MÐ$M½vÀaÈ¹|¼|Ð$MÑ$MÔ$MÑMÔM˜Ø  1™u˜Ý!'¨¨!¡¤ð 4ð 4˜AØ˜a ˜c˜F˜FœF a¨¨!¨¤f¨t¡mÑ3˜F˜F™F˜Fð4ð "�A�a˜�c‘F‘Fð ˜’� 4¨5¢= =Ø˜#�vðwF	!ð F	!ð F	!ð F	!ñ F	!ô F	!ð F	!ð F	!ðD —’‘”ˆAÝ˜A˜q‘\”\ð "ð "�Ý  !¡ Q™œð "ð "�AØ!�A�a˜�c‘F�Fð"ð ˆAØ˜Ò Ð  d¨hÒ&6Ð&6Ø�ð ˆFŒF�q˜‘s‰OˆFŒFÝ˜A˜q‘\”\ð "ð "�Ø��!�A�#‘Ý  1™œð "ð "�AØ!�A�a˜�c‘F�Fð"õ ˜A˜a™C  RÑ(Ô(ð !ñ !�Ø˜”V�G�Ø�!�A�#��”˜!‘��‘å  !¡ Q™œð 	0ð 	0�AØð %ØŸHšHÐ$WÐ$WÐ$WÐ$WÐ$WÐ$WÐ$WÍÈqÐQRÉsÐTUÉÌÐ$WÑ$WÔ$WÑWÔW˜Ø  3§8¢8¨A¡;¤;™˜˜àŸHšHÐ$MÐ$MÐ$MÐ$MÐ$MÐ$M½fÀQÀqÁSÈ!¹n¼nÐ$MÑ$MÔ$MÑMÔM˜Ø  1™u˜Ø!�A�a˜�c‘FÝ# A a¡C¨™^œ^ð 0ð 0˜Ø˜!˜A˜#˜˜œ ! A a C¤&¨4¡-Ñ/˜˜™˜ð0õ    !¡ Q™œð !ð !�AØ�a˜�d�G�G”G˜q‘L�G�G‘G�Gñ!ð �a˜˜!˜˜A˜a˜C˜”j�=ðMF	!ð F	!ð F	!ð F	!ñ F	!ô F	!ð F	!ð F	!ð F	!ð F	!ð F	!ð F	!øøøð F	!ð F	!ð F	!ð F	!ð F	!ð F	!s   Á2R[>ÔG[>Û>\Ü\)FTr@   ro   )rŸ   r<   )Ú__name__Ú
__module__Ú__qualname__r-   r4   r:   rJ   rT   rX   r\   rc   rx   rN   r~   r�   rI   r•   r™   rž   r¾   r   r   r   r   r   l   sG  € € € € € ð+ð +ð +ð +ðZð ð ð ð&ð ð ð 'ð 'ð 'ðRð ð ð ð$ð ð ð@?ð ?ð ?ðð ð ðB'ð 'ð 'ðjð ð ðð ð ð ð8Tð Tð Tð Tðlð ð ðBð ð ð..ð .ð .ð .ð$ð ð ðI!ð I!ð I!ð I!ð I!ð I!r   r   N)Ú__doc__r   Úlibmp.backendr   Úobjectr   r   r   r   ú<module>rÅ      sv   ðð`ð `ðN Ð Ð Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "ðf
!ð f
!ð f
!ð f
!ð f
!˜6ñ f
!ô f
!ð f
!ð f
!ð f
!r   