§
    fŠtj]D  ã                   óÜ   — d dl Zd dlmZmZ d dlmZmZmZ d dl	m
Z
 d dlmZ ddlmZmZmZmZmZmZmZmZ ddlmZmZ d	Zd
ZdZdZd„ Zd„ Zd„ Z G d„ de¦  «        Z  G d„ de¦  «        Z!dS )é    N)Ú	lu_factorÚlu_solve)ÚissparseÚ
csc_matrixÚeye)Úsplu)Úgroup_columnsé   )Úvalidate_max_stepÚvalidate_tolÚselect_initial_stepÚnormÚEPSÚnum_jacÚvalidate_first_stepÚwarn_extraneous)Ú	OdeSolverÚDenseOutputé   é   gš™™™™™É?é
   c                 ó  — t          j        d| dz   ¦  «        dd…df         }t          j        d| dz   ¦  «        }t          j        | dz   | dz   f¦  «        }|dz
  ||z  z
  |z  |dd…dd…f<   d|d<   t          j        |d¬¦  «        S )z6Compute the matrix for changing the differences array.r
   Nr   ©Úaxis)ÚnpÚarangeÚzerosÚcumprod)ÚorderÚfactorÚIÚJÚMs        úV/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/scipy/integrate/_ivp/bdf.pyÚ	compute_Rr%      sš   € å
Œ	�!�U˜Q‘YÑÔ    4 Ô(€AÝ
Œ	�!�U˜Q‘YÑÔ€AÝ
Œ�%˜!‘)˜U Q™YÐ'Ñ(Ô(€AØ�Q‘˜ !™Ñ# qÑ(€A€a€b€bˆ!ˆ"ˆ"€f�IØ€A€a�DÝŒ:�a˜aÐ Ñ Ô Ð ó    c                 óÊ   — t          ||¦  «        }t          |d¦  «        }|                     |¦  «        }t          j        |j        | d|dz   …         ¦  «        | d|dz   …<   dS )z<Change differences array in-place when step size is changed.r
   N)r%   Údotr   ÚT)ÚDr   r    ÚRÚUÚRUs         r$   Úchange_Dr.      s^   € å�%˜Ñ Ô €AÝ�%˜ÑÔ€AØ	
�Šˆq‰Œ€BÝ”F˜2œ4  : E¨A¡I :¤Ñ/Ô/€A€j€uˆq�y€j�M€M€Mr&   c	                 óÖ  — d}	|                      ¦   «         }
d}d}t          t          ¦  «        D ]²} | ||
¦  «        }t          j        t          j        |¦  «        ¦  «        s n} ||||z  |z
  |	z
  ¦  «        }t          ||z  ¦  «        }|€d}n||z  }|�"|dk    s|t          |z
  z  d|z
  z  |z  |k    r n(|
|z  }
|	|z  }	|dk    s|�|d|z
  z  |z  |k     rd} n|}Œ³||dz   |
|	fS )z5Solve the algebraic system resulting from BDF method.r   NFr
   T)ÚcopyÚrangeÚNEWTON_MAXITERr   ÚallÚisfiniter   )ÚfunÚt_newÚ	y_predictÚcÚpsiÚLUÚsolve_luÚscaleÚtolÚdÚyÚdy_norm_oldÚ	convergedÚkÚfÚdyÚdy_normÚrates                     r$   Úsolve_bdf_systemrG   $   s=  € à	€AØ�ŠÑÔ€AØ€KØ€IÝ•>Ñ"Ô"ð ð ˆØˆC��q‰MŒMˆÝŒv•b”k !‘n”nÑ%Ô%ð 	ØˆEàˆX�b˜!˜a™% #™+¨™/Ñ*Ô*ˆÝ�r˜E‘zÑ"Ô"ˆàÐØˆDˆDà˜[Ñ(ˆDàÐ $¨!¢) )Ø�¨!Ñ+Ñ,°°D±Ñ9¸GÑCÀcÒIÐIØˆEà	ˆR‰ˆØ	ˆR‰ˆà�qŠLˆLØÐ  T¨Q°©XÑ%6¸Ñ%@À3Ò%FÐ%FØˆIØˆEàˆˆà�a˜!‘e˜Q Ð!Ð!r&   c                   óN   ‡ — e Zd ZdZej        ddddddfˆ fd„	Zd„ Zd„ Zd	„ Z	ˆ xZ
S )
ÚBDFaý  Implicit method based on backward-differentiation formulas.

    This is a variable order method with the order varying automatically from
    1 to 5. The general framework of the BDF algorithm is described in [1]_.
    This class implements a quasi-constant step size as explained in [2]_.
    The error estimation strategy for the constant-step BDF is derived in [3]_.
    An accuracy enhancement using modified formulas (NDF) [2]_ is also implemented.

    Can be applied in the complex domain.

    Parameters
    ----------
    fun : callable
        Right-hand side of the system: the time derivative of the state ``y``
        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
        return an array of the same shape as ``y``. See `vectorized` for more
        information.
    t0 : float
        Initial time.
    y0 : array_like, shape (n,)
        Initial state.
    t_bound : float
        Boundary time - the integration won't continue beyond it. It also
        determines the direction of the integration.
    first_step : float or None, optional
        Initial step size. Default is ``None`` which means that the algorithm
        should choose.
    max_step : float, optional
        Maximum allowed step size. Default is np.inf, i.e., the step size is not
        bounded and determined solely by the solver.
    rtol, atol : float and array_like, optional
        Relative and absolute tolerances. The solver keeps the local error
        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
        relative accuracy (number of correct digits), while `atol` controls
        absolute accuracy (number of correct decimal places). To achieve the
        desired `rtol`, set `atol` to be smaller than the smallest value that
        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
        number of correct digits is not guaranteed. Conversely, to achieve the
        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
        than `atol`. If components of y have different scales, it might be
        beneficial to set different `atol` values for different components by
        passing array_like with shape (n,) for `atol`. Default values are
        1e-3 for `rtol` and 1e-6 for `atol`.
    jac : {None, array_like, sparse_matrix, callable}, optional
        Jacobian matrix of the right-hand side of the system with respect to y,
        required by this method. The Jacobian matrix has shape (n, n) and its
        element (i, j) is equal to ``d f_i / d y_j``.
        There are three ways to define the Jacobian:

            * If array_like or sparse_matrix, the Jacobian is assumed to
              be constant.
            * If callable, the Jacobian is assumed to depend on both
              t and y; it will be called as ``jac(t, y)`` as necessary.
              For the 'Radau' and 'BDF' methods, the return value might be a
              sparse matrix.
            * If None (default), the Jacobian will be approximated by
              finite differences.

        It is generally recommended to provide the Jacobian rather than
        relying on a finite-difference approximation.
    jac_sparsity : {None, array_like, sparse matrix}, optional
        Defines a sparsity structure of the Jacobian matrix for a
        finite-difference approximation. Its shape must be (n, n). This argument
        is ignored if `jac` is not `None`. If the Jacobian has only few non-zero
        elements in *each* row, providing the sparsity structure will greatly
        speed up the computations [4]_. A zero entry means that a corresponding
        element in the Jacobian is always zero. If None (default), the Jacobian
        is assumed to be dense.
    vectorized : bool, optional
        Whether `fun` can be called in a vectorized fashion. Default is False.

        If ``vectorized`` is False, `fun` will always be called with ``y`` of
        shape ``(n,)``, where ``n = len(y0)``.

        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
        the returned array is the time derivative of the state corresponding
        with a column of ``y``).

        Setting ``vectorized=True`` allows for faster finite difference
        approximation of the Jacobian by this method, but may result in slower
        execution overall in some circumstances (e.g. small ``len(y0)``).

    Attributes
    ----------
    n : int
        Number of equations.
    status : string
        Current status of the solver: 'running', 'finished' or 'failed'.
    t_bound : float
        Boundary time.
    direction : float
        Integration direction: +1 or -1.
    t : float
        Current time.
    y : ndarray
        Current state.
    t_old : float
        Previous time. None if no steps were made yet.
    step_size : float
        Size of the last successful step. None if no steps were made yet.
    nfev : int
        Number of evaluations of the right-hand side.
    njev : int
        Number of evaluations of the Jacobian.
    nlu : int
        Number of LU decompositions.

    References
    ----------
    .. [1] G. D. Byrne, A. C. Hindmarsh, "A Polyalgorithm for the Numerical
           Solution of Ordinary Differential Equations", ACM Transactions on
           Mathematical Software, Vol. 1, No. 1, pp. 71-96, March 1975.
    .. [2] L. F. Shampine, M. W. Reichelt, "THE MATLAB ODE SUITE", SIAM J. SCI.
           COMPUTE., Vol. 18, No. 1, pp. 1-22, January 1997.
    .. [3] E. Hairer, G. Wanner, "Solving Ordinary Differential Equations I:
           Nonstiff Problems", Sec. III.2.
    .. [4] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
           sparse Jacobian matrices", Journal of the Institute of Mathematics
           and its Applications, 13, pp. 117-120, 1974.
    gü©ñÒMbP?g�íµ ÷Æ°>NFc                 ó¸  •‡ — t          |¦  «         t          ¦   «                              |||||
d¬¦  «         t          |¦  «        ‰ _        t          ||‰ j        ¦  «        \  ‰ _        ‰ _        ‰  	                    ‰ j
        ‰ j        ¦  «        }|€<t          ‰ j	        ‰ j
        ‰ j        |||‰ j        d‰ j        ‰ j        ¦
  «
        ‰ _        nt          |||¦  «        ‰ _        d ‰ _        d ‰ _        t%          dt&          z  |z  t)          d|dz  ¦  «        ¦  «        ‰ _        d ‰ _        ‰                      ||	¦  «        \  ‰ _        ‰ _        t5          ‰ j        ¦  «        r*ˆ fd„}d„ }t7          ‰ j        d	‰ j        j        ¬
¦  «        }n-ˆ fd„}d„ }t;          j        ‰ j        ‰ j        j        ¬¦  «        }|‰ _        |‰ _         |‰ _!        t;          j"        g d¢¦  «        }t;          j#        dt;          j$        dt;          j%        dtL          dz   ¦  «        z  ¦  «        f¦  «        ‰ _'        d|z
  ‰ j'        z  ‰ _(        |‰ j'        z  dt;          j%        dtL          dz   ¦  «        z  z   ‰ _)        t;          j*        tL          dz   ‰ j        f‰ j        j        ¬¦  «        }‰ j        |d<   |‰ j        z  ‰ j        z  |d<   |‰ _+        d‰ _,        d‰ _-        d ‰ _.        d S )NT)Úsupport_complexr
   r   g¸…ëQ¸ž?ç      à?c                 óB   •— ‰xj         dz  c_         t          | ¦  «        S ©Nr
   )Únlur   ©ÚAÚselfs    €r$   ÚluzBDF.__init__.<locals>.luÞ   s   ø€ Ø�”˜A‘�”Ý˜A‘w”w�r&   c                 ó,   — |                       |¦  «        S )N)Úsolve©r:   Úbs     r$   r;   zBDF.__init__.<locals>.solve_luâ   s   € Ø—x’x ‘{”{Ð"r&   Úcsc)ÚformatÚdtypec                 óF   •— ‰xj         dz  c_         t          | d¬¦  «        S )Nr
   T)Úoverwrite_a)rO   r   rP   s    €r$   rS   zBDF.__init__.<locals>.luç   s%   ø€ Ø�”˜A‘�”Ý  °Ð5Ñ5Ô5Ð5r&   c                 ó&   — t          | |d¬¦  «        S )NT)Úoverwrite_b)r   rV   s     r$   r;   zBDF.__init__.<locals>.solve_luë   s   € Ý  A°4Ð8Ñ8Ô8Ð8r&   ©rZ   )r   g®Gáz®Ç¿gÇqÇq¼¿gýöuàœµ¿gsh‘í|?¥¿r   r   é   é   )/r   ÚsuperÚ__init__r   Úmax_stepr   ÚnÚrtolÚatolr5   Útr?   r   Ú	directionÚh_absr   Ú	h_abs_oldÚerror_norm_oldÚmaxr   ÚminÚ
newton_tolÚ
jac_factorÚ_validate_jacÚjacr"   r   r   rZ   r   ÚidentityrS   r;   r!   ÚarrayÚhstackÚcumsumr   Ú	MAX_ORDERÚgammaÚalphaÚerror_constÚemptyr*   r   Ún_equal_stepsr:   )rR   r5   Út0Úy0Út_boundrd   rf   rg   rr   Újac_sparsityÚ
vectorizedÚ
first_stepÚ
extraneousrC   rS   r;   r!   Úkappar*   Ú	__class__s   `                  €r$   rc   zBDF.__init__Æ   sÎ  øø€ õ 	˜
Ñ#Ô#Ð#Ý‰Œ×Ò˜˜b " g¨zØ)-ð 	ñ 	/ô 	/ð 	/å)¨(Ñ3Ô3ˆŒÝ+¨D°$¸¼Ñ?Ô?ÑˆŒ	�4”9Ø�HŠH�T”V˜TœVÑ$Ô$ˆØÐÝ,¨T¬X°t´v¸t¼vØ-4°hÀØ-1¬^¸QØ-1¬Y¸¼	ñCô CˆDŒJˆJõ
 -¨Z¸¸WÑEÔEˆDŒJØˆŒØ"ˆÔå˜b¥3™h¨™o­s°4¸À¹Ñ/EÔ/EÑFÔFˆŒàˆŒØ×-Ò-¨c°<Ñ@Ô@ÑˆŒ�$”&Ý�D”FÑÔð 	8ðð ð ð ð ð#ð #ð #õ �D”F 5°´´Ð=Ñ=Ô=ˆAˆAð6ð 6ð 6ð 6ð 6ð9ð 9ð 9õ ”˜DœF¨$¬&¬,Ð7Ñ7Ô7ˆAàˆŒØ ˆŒØˆŒå”Ð@Ð@Ð@ÑAÔAˆÝ”Y ¥2¤9¨Qµ´¸1½iÈ!¹mÑ1LÔ1LÑ-LÑ#MÔ#MÐNÑOÔOˆŒ
Ø˜%‘i 4¤:Ñ-ˆŒ
Ø  4¤:Ñ-°µB´I¸aÅÈQÁÑ4OÔ4OÑ0OÑOˆÔåŒH•i !‘m T¤VÐ,°D´F´LÐAÑAÔAˆØŒvˆˆ!‰Ø�4”:‰~ ¤Ñ.ˆˆ!‰ØˆŒàˆŒ
ØˆÔØˆŒˆˆr&   c                 ó4  ‡ ‡‡‡— ‰ j         }‰ j        Š‰€G‰�1t          ‰¦  «        rt          ‰¦  «        Št	          ‰¦  «        }‰|fŠˆ ˆfd„} ||‰¦  «        }�n:t          ‰¦  «        rª ‰|‰¦  «        }‰ xj        dz  c_        t          |¦  «        rt          |‰j        ¬¦  «        }ˆˆ ˆfd„}n"t          j	        |‰j        ¬¦  «        }ˆˆ ˆfd„}|j
        ‰ j        ‰ j        fk    r't          d‰ j        ‰ j        f› d|j
        › d�¦  «        ‚n�t          ‰¦  «        rt          ‰‰j        ¬¦  «        }nt          j	        ‰‰j        ¬¦  «        }|j
        ‰ j        ‰ j        fk    r't          d‰ j        ‰ j        f› d|j
        › d�¦  «        ‚d }||fS )	Nc           	      ó¬   •— ‰xj         dz  c_         ‰                     | |¦  «        }t          ‰j        | ||‰j        ‰j        ‰¦  «        \  }‰_        |S rN   )ÚnjevÚ
fun_singler   Úfun_vectorizedrg   rp   )rh   r?   rC   r"   rR   Úsparsitys       €€r$   Újac_wrappedz&BDF._validate_jac.<locals>.jac_wrapped  sY   ø€ Ø�	”	˜Q‘�	”	Ø—O’O A qÑ)Ô)�Ý%,¨TÔ-@À!ÀQÈØ-1¬Y¸¼Ø-5ñ&7ô &7Ñ"��4”?ð �r&   r
   r_   c                 ód   •— ‰xj         dz  c_         t           ‰| |¦  «        ‰j        ¬¦  «        S ©Nr
   r_   )rˆ   r   rZ   ©rh   r?   rr   rR   r~   s     €€€r$   rŒ   z&BDF._validate_jac.<locals>.jac_wrapped  s1   ø€ Ø�I”I ‘N�I”IÝ% c c¨!¨Q¡i¤i°r´xÐ@Ñ@Ô@Ð@r&   c                 ón   •— ‰xj         dz  c_         t          j         ‰| |¦  «        ‰j        ¬¦  «        S rŽ   )rˆ   r   ÚasarrayrZ   r�   s     €€€r$   rŒ   z&BDF._validate_jac.<locals>.jac_wrapped!  s3   ø€ Ø�I”I ‘N�I”IÝœ: c c¨!¨Q¡i¤i°r´xÐ@Ñ@Ô@Ð@r&   z `jac` is expected to have shape z, but actually has ú.)rh   r?   r   r   r	   Úcallablerˆ   rZ   r   r‘   Úshapere   Ú
ValueError)rR   rr   r‹   r}   ÚgroupsrŒ   r"   r~   s   ```    @r$   rq   zBDF._validate_jac  sW  øøøø€ ØŒVˆØŒVˆàˆ;ØÐ#Ý˜HÑ%Ô%ð 4Ý)¨(Ñ3Ô3�HÝ& xÑ0Ô0�Ø$ fÐ-�ðð ð ð ð ð ð �˜B Ñ#Ô#ˆA‰AÝ�c‰]Œ]ð 	Ø��B˜‘”ˆAØˆIŒI˜‰NˆIŒIÝ˜‰{Œ{ð AÝ˜q¨¬Ð1Ñ1Ô1�ðAð Að Að Að Að Að Að Aõ ”J˜q¨¬Ð1Ñ1Ô1�ðAð Að Að Að Að Að Að Œw˜4œ6 4¤6Ð*Ò*Ð*Ý ð "AÀTÄVÈTÌVÐDTð "Að "AØ67´gð"Að "Að "Añ Bô Bð Bð +õ ˜‰}Œ}ð 4Ý˜s¨"¬(Ð3Ñ3Ô3��å”J˜s¨"¬(Ð3Ñ3Ô3�àŒw˜4œ6 4¤6Ð*Ò*Ð*Ý ð "AÀTÄVÈTÌVÐDTð "Að "AØ67´gð"Að "Að "Añ Bô Bð BàˆKà˜Aˆ~Ðr&   c                 ón
  — | j         }| j        }| j        }dt          j        t          j        || j        t          j        z  ¦  «        |z
  ¦  «        z  }| j        |k    r(|}t          || j
        || j        z  ¦  «         d| _        n:| j        |k     r(|}t          || j
        || j        z  ¦  «         d| _        n| j        }| j        }| j        }| j
        }| j        }	| j        }
| j        }| j        }| j        }| j        d u }d}|�s;||k     r	d| j        fS || j        z  }||z   }| j        || j        z
  z  dk    r9| j        }t          ||t          j        ||z
  ¦  «        |z  ¦  «         d| _        d }||z
  }t          j        |¦  «        }t          j        |d |dz   …         d¬¦  «        }||t          j        |¦  «        z  z   }t          j        |d|dz   …         j        |
d|dz   …         ¦  «        |	|         z  }d}||	|         z  }|sn|€ |                      | j        ||z  z
  ¦  «        }t7          | j        |||||| j        || j        ¦	  «	        \  }}}}|s|rn|                      ||¦  «        }d }d}|¯n|s#d}||z  }t          |||¦  «         d| _        d }�ŒŸdd	t>          z  dz   z  d	t>          z  |z   z  }||t          j        |¦  «        z  z   }||         |z  }tA          ||z  ¦  «        }|dk    r?tC          tD          ||d
|dz   z  z  z  ¦  «        }||z  }t          |||¦  «         d| _        nd}|�¯;| xj        dz  c_        || _         || _#        || _        || _        || _        |||dz            z
  ||d	z   <   |||dz   <   tI          tK          |dz   ¦  «        ¦  «        D ]}||xx         ||dz            z  cc<   Œ| j        |dz   k     rdS |dk    r'||dz
           ||         z  }tA          ||z  ¦  «        } nt          j        } |tL          k     r*||dz            ||d	z            z  }!tA          |!|z  ¦  «        }"nt          j        }"t          j'        | ||"g¦  «        }#t          j(        d¬¦  «        5  |#d
t          j)        ||dz   ¦  «        z  z  }$d d d ¦  «         n# 1 swxY w Y   t          j*        |$¦  «        dz
  }%||%z  }|| _
        tW          tX          |t          j!        |$¦  «        z  ¦  «        }| xj        |z  c_        t          |||¦  «         d| _        d | _        dS )Nr   r   Fr
   r   TrL   gÍÌÌÌÌÌì?r`   éÿÿÿÿ)TNÚignore)Údividera   )-rh   r*   rd   r   ÚabsÚ	nextafterri   Úinfrj   r.   r   r|   rg   rf   ry   rx   rz   r"   r:   rr   ÚTOO_SMALL_STEPr   Úsumr(   r)   rS   r!   rG   r5   r;   ro   r2   r   rm   Ú
MIN_FACTORr?   Úreversedr1   rw   rt   Úerrstater   Úargmaxrn   Ú
MAX_FACTOR)&rR   rh   r*   rd   Úmin_steprj   rg   rf   r   ry   rx   rz   r"   r:   Úcurrent_jacÚstep_acceptedÚhr6   r7   r<   r9   rA   r8   Ún_iterÚy_newr>   r    ÚsafetyÚerrorÚ
error_normÚiÚerror_mÚerror_m_normÚerror_pÚerror_p_normÚerror_normsÚfactorsÚdelta_orders&                                         r$   Ú
_step_implzBDF._step_impl5  s!  € ØŒFˆØŒFˆà”=ˆØ�œ�rœ|¨A¨t¬~ÅÄÑ/FÑGÔGÈ!ÑKÑLÔLÑLˆØŒ:˜Ò Ð ØˆEÝ�Q˜œ
 H¨t¬zÑ$9Ñ:Ô:Ð:Ø!"ˆDÔÐØŒZ˜(Ò"Ð"ØˆEÝ�Q˜œ
 H¨t¬zÑ$9Ñ:Ô:Ð:Ø!"ˆDÔÐà”JˆEàŒyˆØŒyˆØ”
ˆà”
ˆØ”
ˆØÔ&ˆàŒFˆØŒWˆØ”h $Ð&ˆàˆØñ >	%Ø�xÒÐØ˜dÔ1Ð1Ð1à˜œÑ&ˆAØ˜‘EˆEàŒ~ ¨¬Ñ!5Ñ6¸Ò:Ð:Øœ�Ý˜˜E¥2¤6¨%°!©)Ñ#4Ô#4°uÑ#<Ñ=Ô=Ð=Ø%&�Ô"Ø�à˜‘	ˆAÝ”F˜1‘I”IˆEåœ˜q  %¨!¡) œ}°1Ð5Ñ5Ô5ˆIà˜4¥"¤&¨Ñ"3Ô"3Ñ3Ñ3ˆEÝ”&˜˜1˜e a™i˜<œÔ*¨E°!°U¸Q±Y°,Ô,?Ñ@Ô@À5ÈÄ<ÑOˆCàˆIØ�E˜%”LÑ ˆAØð 'Ø�:ØŸš ¤¨!¨a©%¡Ñ0Ô0�Bå.>Ø”H˜e Y°°3¸¸D¼MØ˜4œ?ñ/,ô /,Ñ+�	˜6 5¨!ð !ð 'Ø"ð ØØŸš ¨	Ñ2Ô2�AØ�BØ"&�Kð  ð 'ð ð Ø�Ø˜‘�Ý˜˜E 6Ñ*Ô*Ð*Ø%&�Ô"Ø�Ùà˜A¥Ñ.°Ñ2Ñ3°q½>Ñ7IØ9?ñ8@ñ AˆFð ˜4¥"¤&¨¡-¤-Ñ/Ñ/ˆEØ Ô&¨Ñ*ˆEÝ˜e e™mÑ,Ô,ˆJà˜AŠ~ˆ~Ý�ZØ# j°R¸5À1¹9Ñ5EÑ&FÑFñHô H�à˜‘�Ý˜˜E 6Ñ*Ô*Ð*Ø%&�Ô"Ð"ð !%�ð}  ñ >	%ð@ 	ÐÔ˜aÑÐÔàˆŒØˆŒàˆŒ
ØˆŒØˆŒð ˜1˜U Q™Yœ<Ñ'ˆˆ%�!‰)‰Øˆˆ%�!‰)‰Ý�% ¨¡	Ñ*Ô*Ñ+Ô+ð 	ð 	ˆAØˆaˆDˆDŒD�A�a˜!‘e”HÑˆDˆD‰DˆDàÔ ¨¡	Ò)Ð)Ø�:à�1Š9ˆ9Ø! %¨!¡)Ô,¨q°¬xÑ7ˆGÝ ¨%¡Ñ0Ô0ˆLˆLåœ6ˆLà•9ÒÐØ! %¨!¡)Ô,¨q°¸±¬|Ñ;ˆGÝ ¨%¡Ñ0Ô0ˆLˆLåœ6ˆLå”h ¨j¸,ÐGÑHÔHˆÝŒ[ Ð)Ñ)Ô)ð 	Hð 	HØ! b­2¬9°U¸EÀA¹IÑ+FÔ+FÑ&FÑGˆGð	Hð 	Hð 	Hñ 	Hô 	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Høøøð 	Hð 	Hð 	Hð 	Hõ ”i Ñ(Ô(¨1Ñ,ˆØ�ÑˆØˆŒ
å•Z ­"¬&°©/¬/Ñ!9Ñ:Ô:ˆØˆ
Œ
�fÑˆ
Œ
Ý��E˜6Ñ"Ô"Ð"ØˆÔØˆŒàˆzs   ÒR.Ò.R2Ò5R2c           
      ó®   — t          | j        | j        | j        | j        z  | j        | j        d | j        dz   …                              ¦   «         ¦  «        S rN   )ÚBdfDenseOutputÚt_oldrh   rj   ri   r   r*   r0   )rR   s    r$   Ú_dense_output_implzBDF._dense_output_implÄ  sN   € Ý˜dœj¨$¬&°$´*¸t¼~Ñ2MØ"œj¨$¬&°°$´*¸q±.°Ô*A×*FÒ*FÑ*HÔ*HñJô Jð 	Jr&   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r�   rc   rq   r¶   rº   Ú__classcell__©r…   s   @r$   rI   rI   H   s™   ø€ € € € € ð{ð {ðz 79´fØ ¨4¸dØ!¨dð:ð :ð :ð :ð :ð :ðx1ð 1ð 1ðfMð Mð Mð^Jð Jð Jð Jð Jð Jð Jr&   rI   c                   ó$   ‡ — e Zd Zˆ fd„Zd„ Zˆ xZS )r¸   c                 ó  •— t          ¦   «                              ||¦  «         || _        | j        |t	          j        | j        ¦  «        z  z
  | _        |dt	          j        | j        ¦  «        z   z  | _        || _        d S rN   )	rb   rc   r   rh   r   r   Út_shiftÚdenomr*   )rR   r¹   rh   r¨   r   r*   r…   s         €r$   rc   zBdfDenseOutput.__init__Ê  sk   ø€ Ý‰Œ×Ò˜ Ñ"Ô"Ð"ØˆŒ
Ø”v ¥B¤I¨d¬jÑ$9Ô$9Ñ 9Ñ9ˆŒØ˜!�bœi¨¬
Ñ3Ô3Ñ3Ñ4ˆŒ
ØˆŒˆˆr&   c                 ó’  — |j         dk    r'|| j        z
  | j        z  }t          j        |¦  «        }n<|| j        d d …d f         z
  | j        d d …d f         z  }t          j        |d¬¦  «        }t          j        | j        dd …         j        |¦  «        }|j         dk    r|| j        d         z  }n|| j        dd d …d f         z  }|S )Nr   r   r
   )ÚndimrÃ   rÄ   r   r   r(   r*   r)   )rR   rh   ÚxÚpr?   s        r$   Ú
_call_implzBdfDenseOutput._call_implÑ  sÉ   € ØŒ6�QŠ;ˆ;Ø�T”\Ñ! T¤ZÑ/ˆAÝ”
˜1‘”ˆAˆAà�T”\ ! ! ! T 'Ô*Ñ*¨d¬j¸¸¸¸D¸Ô.AÑAˆAÝ”
˜1 1Ð%Ñ%Ô%ˆAåŒF�4”6˜!˜"˜"”:”< Ñ#Ô#ˆØŒ6�QŠ;ˆ;Ø�”˜”‰NˆAˆAà�”˜˜1˜1˜1˜d˜
Ô#Ñ#ˆAàˆr&   )r»   r¼   r½   rc   rÉ   r¿   rÀ   s   @r$   r¸   r¸   É  sG   ø€ € € € € ðð ð ð ð ðð ð ð ð ð ð r&   r¸   )"Únumpyr   Úscipy.linalgr   r   Úscipy.sparser   r   r   Úscipy.sparse.linalgr   Úscipy.optimize._numdiffr	   Úcommonr   r   r   r   r   r   r   r   Úbaser   r   rw   r2   r    r¤   r%   r.   rG   rI   r¸   © r&   r$   ú<module>rÒ      sœ  ðØ Ð Ð Ð Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø $Ð $Ð $Ð $Ð $Ð $Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1ð&ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð &ð )Ð (Ð (Ð (Ð (Ð (Ð (Ð (ð €	Ø€Ø€
Ø€
ð!ð !ð !ð0ð 0ð 0ð!"ð !"ð !"ðH~Jð ~Jð ~Jð ~Jð ~Jˆ)ñ ~Jô ~Jð ~JðBð ð ð ð �[ñ ô ð ð ð r&   