§
    fŠtjÜL  ã                   ó’  — 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 ej        d
ez
  dz  d
ez   dz  dg¦  «        Z ej        ddez  z
  ddez  z   dg¦  «        dz  ZdZdZ ej        g d¢g d¢g d¢g¦  «        Z ej        g d¢g d¢g d¢g¦  «        Z e d          Z!e d         de d         z  z   Z" ej        ddez  dz  z   ddez  dz  z
  ddez  z   gddez  dz  z
  ddez  dz  z   ddez  z
  gg d¢g¦  «        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)Ú
csc_matrixÚissparseÚeye)Úsplu)Úgroup_columnsé   )Úvalidate_max_stepÚvalidate_tolÚselect_initial_stepÚnormÚnum_jacÚEPSÚwarn_extraneousÚvalidate_first_step)Ú	OdeSolverÚDenseOutputg.!	Ž˜@é   é
   ióÿÿÿé   éÿÿÿÿé   gs>ØH@yrÆà“Ûr@¶üÃòGgÀ)g{g]„#-¸?g÷;@L§Â¿gŽhmù¿ž?)gí¡
ç}Ð?gQµ é Ê?gím£¢‚Ø¿)r
   r
   r   )gFœ§·@g†N¨]ÁøÔ?gïV�õ¿à?)gFœ§·Àg†N¨]ÁøÔ¿g!RÅ �Þ?)gò§$Zˆà?g˜¥ÊoN“ÀgÑß{ÏÀã?ù              ð?é   gUUUUUU@g«ªªªªªÀé   ç«ªªªªª
@é   )gUUUUUUÕ?gUUUUUUÀr   é   gš™™™™™É?c
                 ó  — |j         d         }
t          |z  }t          |z  }t                               |¦  «        }|}t          j        d|
f¦  «        }|t          z  }d}t          j        |¦  «        }d}d}t          t          ¦  «        D �]k}t          d¦  «        D ]#} | |||         z   |||         z   ¦  «        ||<   Œ$t          j        t          j        |¦  «        ¦  «        s �n|j                             t          ¦  «        ||d         z  z
  }|j                             t          ¦  «        ||d         d|d         z  z   z  z
  } |	||¦  «        } |	||¦  «        }||d<   |j        |d<   |j        |d<   t%          ||z  ¦  «        }|�||z  }|�"|dk    s|t          |z
  z  d|z
  z  |z  |k    r n>||z  }t                               |¦  «        }|dk    s|�|d|z
  z  |z  |k     rd} n|}�Œm||dz   ||fS )	a^  Solve the collocation system.

    Parameters
    ----------
    fun : callable
        Right-hand side of the system.
    t : float
        Current time.
    y : ndarray, shape (n,)
        Current state.
    h : float
        Step to try.
    Z0 : ndarray, shape (3, n)
        Initial guess for the solution. It determines new values of `y` at
        ``t + h * C`` as ``y + Z0``, where ``C`` is the Radau method constants.
    scale : ndarray, shape (n)
        Problem tolerance scale, i.e. ``rtol * abs(y) + atol``.
    tol : float
        Tolerance to which solve the system. This value is compared with
        the normalized by `scale` error.
    LU_real, LU_complex
        LU decompositions of the system Jacobians.
    solve_lu : callable
        Callable which solves a linear system given a LU decomposition. The
        signature is ``solve_lu(LU, b)``.

    Returns
    -------
    converged : bool
        Whether iterations converged.
    n_iter : int
        Number of completed iterations.
    Z : ndarray, shape (3, n)
        Found solution.
    rate : float
        The rate of convergence.
    r   r   NFr
   r   r   T)ÚshapeÚMU_REALÚ
MU_COMPLEXÚTIÚdotÚnpÚemptyÚCÚ
empty_likeÚrangeÚNEWTON_MAXITERÚallÚisfiniteÚTÚTI_REALÚ
TI_COMPLEXÚrealÚimagr   )ÚfunÚtÚyÚhÚZ0ÚscaleÚtolÚLU_realÚ
LU_complexÚsolve_luÚnÚM_realÚ	M_complexÚWÚZÚFÚchÚdW_norm_oldÚdWÚ	convergedÚrateÚkÚiÚf_realÚ	f_complexÚdW_realÚ
dW_complexÚdW_norms                               úX/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/scipy/integrate/_ivp/radau.pyÚsolve_collocation_systemrP   0   s+  € ðN 	
Œ�Œ
€AÝ�q‰[€FÝ˜Q‘€Iå
�Šˆr‰
Œ
€AØ
€Aå
Œ�!�Q�ÑÔ€AØ	
�Q‰€Bà€KÝ	Œ�qÑ	Ô	€BØ€IØ€DÝ•>Ñ"Ô"ð !ñ !ˆÝ�q‘”ð 	,ð 	,ˆAØ�3�q˜2˜aœ5‘y ! a¨¤d¡(Ñ+Ô+ˆAˆa‰DˆDåŒv•b”k !‘n”nÑ%Ô%ð 	Ø‰Eà”—’�Ñ!Ô! F¨Q¨q¬T¡MÑ1ˆØ”C—G’G�JÑ'Ô'¨)°q¸´t¸bÀ1ÀQÄ4¹iÑ7GÑ*HÑHˆ	à�(˜7 FÑ+Ô+ˆØ�X˜j¨)Ñ4Ô4ˆ
àˆˆ1‰Ø”ˆˆ1‰Ø”ˆˆ1‰å�r˜E‘zÑ"Ô"ˆØÐ"Ø˜[Ñ(ˆDàÐ $¨!¢) )Ø�¨!Ñ+Ñ,°°D±Ñ9¸GÑCÀcÒIÐIØˆEà	ˆR‰ˆÝ�EŠE�!‰HŒHˆà�qŠLˆLØÐ  T¨Q°©XÑ%6¸Ñ%@À3Ò%FÐ%FØˆIØˆEàˆ‰à�a˜!‘e˜Q Ð$Ð$ó    c                 óÂ   — |�|�|dk    rd}n| |z  ||z  dz  z  }t          j        d¬¦  «        5  t          d|¦  «        |dz  z  }ddd¦  «         n# 1 swxY w Y   |S )a9  Predict by which factor to increase/decrease the step size.

    The algorithm is described in [1]_.

    Parameters
    ----------
    h_abs, h_abs_old : float
        Current and previous values of the step size, `h_abs_old` can be None
        (see Notes).
    error_norm, error_norm_old : float
        Current and previous values of the error norm, `error_norm_old` can
        be None (see Notes).

    Returns
    -------
    factor : float
        Predicted factor.

    Notes
    -----
    If `h_abs_old` and `error_norm_old` are both not None then a two-step
    algorithm is used, otherwise a one-step algorithm is used.

    References
    ----------
    .. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
           Equations II: Stiff and Differential-Algebraic Problems", Sec. IV.8.
    Nr   r
   g      Ð?Úignore)Údivideg      Ð¿)r&   ÚerrstateÚmin)Úh_absÚ	h_abs_oldÚ
error_normÚerror_norm_oldÚ
multiplierÚfactors         rO   Úpredict_factorr]   ‹   s¿   € ð: Ð Ð!2°jÀA²o°oØˆ
ˆ
à˜YÑ&¨.¸:Ñ*EÈ$Ñ)NÑNˆ
å	Œ˜HÐ	%Ñ	%Ô	%ð :ð :Ý�Q˜
Ñ#Ô# j°EÑ&9Ñ9ˆð:ð :ð :ñ :ô :ð :ð :ð :ð :ð :ð :øøøð :ð :ð :ð :ð €Ms   ±AÁAÁAc                   óT   ‡ — e Zd ZdZej        ddddddfˆ fd„	Zd„ Zd„ Zd	„ Z	d
„ Z
ˆ xZS )ÚRadauaÂ  Implicit Runge-Kutta method of Radau IIA family of order 5.

    The implementation follows [1]_. The error is controlled with a
    third-order accurate embedded formula. A cubic polynomial which satisfies
    the collocation conditions is used for the dense output.

    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)``. HHere `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 [2]_. 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] E. Hairer, G. Wanner, "Solving Ordinary Differential Equations II:
           Stiff and Differential-Algebraic Problems", Sec. IV.8.
    .. [2] 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.
    çü©ñÒMbP?g�íµ ÷Æ°>NFc                 óÔ  •‡ — t          |¦  «         t          ¦   «                              |||||
¦  «         d ‰ _        t	          |¦  «        ‰ _        t          ||‰ j        ¦  «        \  ‰ _        ‰ _	        ‰  
                    ‰ j        ‰ j        ¦  «        ‰ _        |€At          ‰ j
        ‰ j        ‰ j        ||‰ j        ‰ j        d‰ j        ‰ j	        ¦
  «
        ‰ _        nt#          |||¦  «        ‰ _        d ‰ _        d ‰ _        t)          dt*          z  |z  t-          d|dz  ¦  «        ¦  «        ‰ _        d ‰ _        d ‰ _        ‰                      ||	¦  «        \  ‰ _        ‰ _        t;          ‰ j        ¦  «        rˆ fd„}d„ }t=          ‰ j        d¬¦  «        }n!ˆ fd	„}d
„ }t?          j         ‰ j        ¦  «        }|‰ _!        |‰ _"        |‰ _#        d‰ _$        d ‰ _%        d ‰ _&        d ‰ _'        d S )Nr   r   g¸…ëQ¸ž?ç      à?c                 óB   •— ‰xj         dz  c_         t          | ¦  «        S ©Nr
   )Únlur   ©ÚAÚselfs    €rO   ÚluzRadau.__init__.<locals>.luA  s   ø€ Ø�”˜A‘�”Ý˜A‘w”w�rQ   c                 ó,   — |                       |¦  «        S ©N)Úsolve©ÚLUÚbs     rO   r<   z Radau.__init__.<locals>.solve_luE  s   € Ø—x’x ‘{”{Ð"rQ   Úcsc)Úformatc                 óF   •— ‰xj         dz  c_         t          | d¬¦  «        S )Nr
   T)Úoverwrite_a)re   r   rf   s    €rO   ri   zRadau.__init__.<locals>.luJ  s%   ø€ Ø�”˜A‘�”Ý  °Ð5Ñ5Ô5Ð5rQ   c                 ó&   — t          | |d¬¦  «        S )NT)Úoverwrite_b)r   rm   s     rO   r<   z Radau.__init__.<locals>.solve_luN  s   € Ý  A°4Ð8Ñ8Ô8Ð8rQ   T)(r   ÚsuperÚ__init__Úy_oldr   Úmax_stepr   r=   ÚrtolÚatolr3   r4   r5   Úfr   Ú	directionrW   r   rX   rZ   Úmaxr   rV   Ú
newton_tolÚsolÚ
jac_factorÚ_validate_jacÚjacÚJr   r   r&   Úidentityri   r<   ÚIÚcurrent_jacr:   r;   rA   )rh   r3   Út0Úy0Út_boundry   rz   r{   rƒ   Újac_sparsityÚ
vectorizedÚ
first_stepÚ
extraneousri   r<   r†   Ú	__class__s   `               €rO   rw   zRadau.__init__'  sø  øø€ õ 	˜
Ñ#Ô#Ð#Ý‰Œ×Ò˜˜b " g¨zÑ:Ô:Ð:ØˆŒ
Ý)¨(Ñ3Ô3ˆŒÝ+¨D°$¸¼Ñ?Ô?ÑˆŒ	�4”9Ø—’˜$œ& $¤&Ñ)Ô)ˆŒð ÐÝ,Ø”˜$œ& $¤&¨'°8¸T¼VÀTÄ^Ø�4”9˜dœiñ)ô )ˆDŒJˆJõ -¨Z¸¸WÑEÔEˆDŒJØˆŒØ"ˆÔå˜b¥3™h¨™o­s°4¸À¹Ñ/EÔ/EÑFÔFˆŒØˆŒàˆŒØ×-Ò-¨c°<Ñ@Ô@ÑˆŒ�$”&Ý�D”FÑÔð 	$ðð ð ð ð ð#ð #ð #õ �D”F 5Ð)Ñ)Ô)ˆAˆAð6ð 6ð 6ð 6ð 6ð9ð 9ð 9õ ”˜DœFÑ#Ô#ˆAàˆŒØ ˆŒØˆŒàˆÔØˆŒØˆŒØˆŒˆˆrQ   c                 ó  ‡ ‡‡— ‰ j         }‰ j        }‰€M‰�1t          ‰¦  «        rt          ‰¦  «        Št	          ‰¦  «        }‰|fŠˆ ˆfd„} |||‰ j        ¦  «        }�n#t          ‰¦  «        rš ‰||¦  «        }d‰ _        t          |¦  «        rt          |¦  «        }d	ˆˆ fd„	}n"t          j	        |t          ¬¦  «        }d	ˆˆ fd„	}|j        ‰ j        ‰ j        fk    r't          d‰ j        ‰ j        f› d|j        › d�¦  «        ‚nzt          ‰¦  «        rt          ‰¦  «        }nt          j	        ‰t          ¬¦  «        }|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 rd   )Únjevr   Úfun_vectorizedr{   r�   )r4   r5   r|   r„   rh   Úsparsitys       €€rO   Újac_wrappedz(Radau._validate_jac.<locals>.jac_wrappedg  sF   ø€ Ø�	”	˜Q‘�	”	Ý%,¨TÔ-@À!ÀQÈØ-1¬Y¸¼Ø-5ñ&7ô &7Ñ"��4”?ð �rQ   r
   c                 ód   •— ‰xj         dz  c_         t           ‰| |¦  «        t          ¬¦  «        S ©Nr
   ©Údtype)r’   r   Úfloat©r4   r5   Ú_rƒ   rh   s      €€rO   r•   z(Radau._validate_jac.<locals>.jac_wrappedt  s/   ø€ Ø�I”I ‘N�I”IÝ% c c¨!¨Q¡i¤iµuÐ=Ñ=Ô=Ð=rQ   r˜   c                 ón   •— ‰xj         dz  c_         t          j         ‰| |¦  «        t          ¬¦  «        S r—   )r’   r&   Úasarrayrš   r›   s      €€rO   r•   z(Radau._validate_jac.<locals>.jac_wrapped{  s1   ø€ Ø�I”I ‘N�I”IÝœ: c c¨!¨Q¡i¤iµuÐ=Ñ=Ô=Ð=rQ   z `jac` is expected to have shape z, but actually has ú.rk   )r4   r5   r   r   r	   r|   Úcallabler’   r&   rž   rš   r!   r=   Ú
ValueError)rh   rƒ   r”   rˆ   r‰   Úgroupsr•   r„   s   ```     rO   r‚   zRadau._validate_jac\  s,  øøø€ ØŒVˆØŒVˆàˆ;ØÐ#Ý˜HÑ%Ô%ð 4Ý)¨(Ñ3Ô3�HÝ& xÑ0Ô0�Ø$ fÐ-�ðð ð ð ð ð ð �˜B  D¤FÑ+Ô+ˆA‰AÝ�c‰]Œ]ð 	Ø��B˜‘”ˆAØˆDŒIÝ˜‰{Œ{ð >Ý˜q‘M”M�ð>ð >ð >ð >ð >ð >ð >ð >õ
 ”J˜q­Ð.Ñ.Ô.�ð>ð >ð >ð >ð >ð >ð >ð Œw˜4œ6 4¤6Ð*Ò*Ð*Ý ð "AÀTÄVÈTÌVÐDTð "Að "AØ67´gð"Að "Að "Añ Bô Bð Bð +õ ˜‰}Œ}ð 1Ý˜s‘O”O��å”J˜s­%Ð0Ñ0Ô0�àŒw˜4œ6 4¤6Ð*Ò*Ð*Ý ð "AÀTÄVÈTÌVÐDTð "Að "AØ67´gð"Að "Að "Añ Bô Bð BàˆKà˜Aˆ~ÐrQ   c                 óì  — | j         }| j        }| j        }| j        }| j        }| j        }dt          j        t          j        || j	        t          j
        z  ¦  «        |z
  ¦  «        z  }| j        |k    r|}d }	d }
n'| j        |k     r|}d }	d }
n| j        }| j        }	| j        }
| j        }| j        }| j        }| j        }| j        }d}d}d }|�s²||k     r	d| j        fS || j	        z  }||z   }| j	        || j        z
  z  dk    r| j        }||z
  }t          j        |¦  «        }| j        €"t          j        d|j        d         f¦  «        }n(|                      ||t0          z  z   ¦  «        j        |z
  }|t          j        |¦  «        |z  z   }d}|s¤|�|€P|                      t6          |z  | j        z  |z
  ¦  «        }|                      t:          |z  | j        z  |z
  ¦  «        }t=          | j        |||||| j         ||| j!        ¦
  «
        \  }}}}|s |rn|                      |||¦  «        }d}d }d }|¯¤|s|dz  }d }d }�Œw||d         z   }|j         "                    tF          ¦  «        |z  }|  !                    |||z   ¦  «        }|t          j$        t          j        |¦  «        t          j        |¦  «        ¦  «        |z  z   }tK          ||z  ¦  «        }dd	tL          z  d
z   z  d	tL          z  |z   z  }|rH|d
k    rB|  !                    ||                      |||z   ¦  «        |z   ¦  «        }tK          ||z  ¦  «        }|d
k    r4tO          ||	||
¦  «        } |tQ          tR          || z  ¦  «        z  }d }d }d}nd}|�¯²|d uo|d	k    o|dk    }!tO          ||	||
¦  «        } tU          tV          || z  ¦  «        } |!s	| dk     rd
} nd }d }|                      ||¦  «        }"|!r ||||"¦  «        }d}n|�d}| j        | _        || _        || z  | _        || _,        || _         || _        |"| _        || _-        || _        || _        || _        || _        || _.        |  /                    ¦   «         | _        ||fS )Nr   Fr   r   Trb   r   gÍÌÌÌÌÌì?r   r
   r`   g333333ó?)0r4   r5   r|   ry   r{   rz   r&   ÚabsÚ	nextafterr}   ÚinfrW   rX   rZ   r„   r:   r;   r‡   rƒ   ÚTOO_SMALL_STEPrŠ   r€   Úzerosr!   r(   r.   ri   r"   r†   r#   rP   r3   r   r<   r%   ÚEÚmaximumr   r+   r]   r~   Ú
MIN_FACTORrV   Ú
MAX_FACTORrx   rA   Út_oldÚ_compute_dense_output)#rh   r4   r5   r|   ry   r{   rz   Úmin_steprW   rX   rZ   r„   r:   r;   r‡   rƒ   ÚrejectedÚstep_acceptedÚmessager6   Út_newr7   r8   rF   Ún_iterrA   rG   Úy_newÚZEÚerrorrY   Úsafetyr\   Úrecompute_jacÚf_news#                                      rO   Ú
_step_implzRadau._step_impl�  s  € ØŒFˆØŒFˆØŒFˆà”=ˆØŒyˆØŒyˆà�œ�rœ|¨A¨t¬~ÅÄÑ/FÑGÔGÈ!ÑKÑLÔLÑLˆØŒ:˜Ò Ð ØˆEØˆIØ!ˆNˆNØŒZ˜(Ò"Ð"ØˆEØˆIØ!ˆNˆNà”JˆEØœˆIØ!Ô0ˆNàŒFˆØ”,ˆØ”_ˆ
àÔ&ˆØŒhˆàˆØˆØˆØñ B	%Ø�xÒÐØ˜dÔ1Ð1Ð1à˜œÑ&ˆAØ˜‘EˆEàŒ~ ¨¬Ñ!5Ñ6¸Ò:Ð:Øœ�à˜‘	ˆAÝ”F˜1‘I”IˆEàŒxÐÝ”X˜q !¤'¨!¤*˜oÑ.Ô.��à—X’X˜a !¥a¡%™iÑ(Ô(Ô*¨QÑ.�à�2œ6 !™9œ9 tÑ+Ñ+ˆEàˆIØð &Ø�? jÐ&8Ø"Ÿgšg¥g°¡k°D´FÑ&:¸QÑ&>Ñ?Ô?�GØ!%§¢­°a©¸$¼&Ñ)@À1Ñ)DÑ!EÔ!E�Jå-EØ”H˜a  A r¨5°$´/Ø˜Z¨¬ñ.8ô .8Ñ*�	˜6 1 dð !ð &Ø"ð ØàŸš  A qÑ)Ô)�AØ"&�KØ"�GØ!%�Jð!  ð &ð$ ð Ø˜‘�Ø�Ø!�
Ùà˜˜"œ‘IˆEØ”—’�‘”˜a‘ˆBØ—M’M '¨1¨r©6Ñ2Ô2ˆEØ�2œ:¥b¤f¨Q¡i¤iµ´¸±´Ñ?Ô?À$ÑFÑFˆEÝ˜e e™mÑ,Ô,ˆJØ˜A¥Ñ.°Ñ2Ñ3°q½>Ñ7IØ9?ñ8@ñ AˆFð ð 1˜J¨šN˜NØŸš g¨t¯xªx¸¸1¸u¹9Ñ/EÔ/EÈÑ/JÑKÔK�Ý! %¨%¡-Ñ0Ô0�
à˜AŠ~ˆ~Ý'¨¨yØ(2°NñDô D�à��Z¨°&©Ñ9Ô9Ñ9�à�Ø!�
Ø��à $�ðE  ñ B	%ðH  4˜ÐF¨F°QªJÐF¸4À$º;ˆå  y°*¸nÑMÔMˆÝ•Z ¨&¡Ñ1Ô1ˆàð 	 ¨#¢ ØˆFˆFàˆGØˆJà—’˜ Ñ&Ô&ˆØð 	 Ø��E˜5 %Ñ(Ô(ˆAØˆKˆKØˆ_ØˆKàœˆŒØ(ˆÔà˜V‘^ˆŒ
àˆŒ
àˆŒØˆŒØˆŒàˆŒàˆŒØ$ˆŒØ&ˆÔØˆŒàˆŒ
Ø×-Ò-Ñ/Ô/ˆŒà˜gÐ%Ð%rQ   c                 óŒ   — t          j        | j        j        t          ¦  «        }t          | j        | j        | j        |¦  «        S rk   )	r&   r%   rA   r.   ÚPÚRadauDenseOutputr­   r4   rx   )rh   ÚQs     rO   r®   zRadau._compute_dense_output  s1   € ÝŒF�4”6”8�QÑÔˆÝ ¤
¨D¬F°D´JÀÑBÔBÐBrQ   c                 ó   — | j         S rk   )r€   )rh   s    rO   Ú_dense_output_implzRadau._dense_output_impl!  s	   € ØŒxˆrQ   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r&   r¦   rw   r‚   r»   r®   rÁ   Ú__classcell__©r�   s   @rO   r_   r_   ³   s¤   ø€ € € € € ðrð rðf 79´fØ ¨4¸dØ!¨dð3ð 3ð 3ð 3ð 3ð 3ðj1ð 1ð 1ðfL&ð L&ð L&ð\Cð Cð Cðð ð ð ð ð ð rQ   r_   c                   ó$   ‡ — e Zd Zˆ fd„Zd„ Zˆ xZS )r¾   c                 ó¦   •— t          ¦   «                              ||¦  «         ||z
  | _        || _        |j        d         dz
  | _        || _        d S rd   )rv   rw   r6   r¿   r!   Úorderrx   )rh   r­   r4   rx   r¿   r�   s        €rO   rw   zRadauDenseOutput.__init__&  sK   ø€ Ý‰Œ×Ò˜ Ñ"Ô"Ð"Ø�U‘ˆŒØˆŒØ”W˜Q”Z !‘^ˆŒ
ØˆŒ
ˆ
ˆ
rQ   c                 ó–  — || j         z
  | j        z  }|j        dk    r2t          j        || j        dz   ¦  «        }t          j        |¦  «        }n5t          j        || j        dz   df¦  «        }t          j        |d¬¦  «        }t          j        | j        |¦  «        }|j        dk    r|| j	        d d …d f         z  }n
|| j	        z  }|S )Nr   r
   )Úaxisr   )
r­   r6   Úndimr&   ÚtilerÊ   Úcumprodr%   r¿   rx   )rh   r4   ÚxÚpr5   s        rO   Ú
_call_implzRadauDenseOutput._call_impl-  s¾   € Ø�”‰^˜tœvÑ%ˆØŒ6�QŠ;ˆ;Ý”˜˜4œ:¨™>Ñ*Ô*ˆAÝ”
˜1‘”ˆAˆAå”˜˜DœJ¨™N¨AÐ.Ñ/Ô/ˆAÝ”
˜1 1Ð%Ñ%Ô%ˆAåŒF�4”6˜1ÑÔˆØŒ6�QŠ;ˆ;Ø�”˜A˜A˜A˜t˜GÔ$Ñ$ˆAˆAà�”‰OˆAàˆrQ   )rÂ   rÃ   rÄ   rw   rÒ   rÆ   rÇ   s   @rO   r¾   r¾   %  sG   ø€ € € € € ðð ð ð ð ðð ð ð ð ð ð rQ   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   ÚS6Úarrayr(   r©   r"   r#   r.   r$   r/   r0   r½   r+   r«   r¬   rP   r]   r_   r¾   © rQ   rO   ú<module>rÝ      sñ  ðØ Ð Ð Ð Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø $Ð $Ð $Ð $Ð $Ð $Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1ð*ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð *ð )Ð (Ð (Ð (Ð (Ð (Ð (Ð (à€ð €B„Hˆq�2‰v˜‰m˜a "™f¨™]¨AÐ.Ñ/Ô/€Ø€B„Hˆc�A˜‘F‰l˜C ! b¡&™L¨"Ð-Ñ.Ô.°Ñ2€ð *€ð5€
ð €B„HØDÐDÐDØDÐDÐDØ€I€Iðñ ô €ð €R„XØCÐCÐCØEÐEÐEØDÐDÐDðFñ Gô G€ð
 ˆQŒ%€Ø�ŒU�R˜"˜Qœ%‘ZÑ€
ð €B„HØ	ˆAˆb‰D�‰F�]�E˜B˜r™E !™G‘O T¨A°©F¡]Ð3Ø	ˆAˆb‰D�‰F�]�E˜B˜r™E !™G‘O T¨A°©F¡]Ð3ØÐÐðñ ô €ð €Ø€
Ø€
ðX%ð X%ð X%ðv%ð %ð %ðPoð oð oð oð oˆIñ oô oð oðdð ð ð ð �{ñ ô ð ð ð rQ   