+
    /•üiä  ã                   óV   € R t ^ RIt^ RIt^ RIt^RIHtHt . t	RR lt
 ! R R]4      tR# )z$Newton-CG trust-region optimization.N)Ú_minimize_trust_regionÚBaseQuadraticSubproblemc                óz   € Vf   \        R4      hVf   Vf   \        R4      h\        W3RVRVRVRVR\        /VB # )aö  
Minimization of scalar function of one or more variables using
the Newton conjugate gradient trust-region algorithm.

Options
-------
initial_trust_radius : float
    Initial trust-region radius.
max_trust_radius : float
    Maximum value of the trust-region radius. No steps that are longer
    than this value will be proposed.
eta : float
    Trust region related acceptance stringency for proposed steps.
gtol : float
    Gradient norm must be less than `gtol` before successful
    termination.

z<Jacobian is required for Newton-CG trust-region minimizationzdEither the Hessian or the Hessian-vector product is required for Newton-CG trust-region minimizationÚargsÚjacÚhessÚhesspÚ
subproblem)Ú
ValueErrorr   ÚCGSteihaugSubproblem)ÚfunÚx0r   r   r   r   Útrust_region_optionss   &&&&&&,Ú]/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/optimize/_trustregion_ncg.pyÚ_minimize_trust_ncgr      su   € ð( ‚{Üð (ó )ð 	)à‚|˜šÜð Oó Pð 	Pä! #ñ :°ð :¸#ð :ÀDð :Ø(-ð:Ü:Nð:à$8ñ:ð :ó    c                   ó*   a € ] tR t^*t o RtR tRtV tR# )r   z:Quadratic subproblem solved by a conjugate gradient methodc                óÌ  € \         P                  ! V P                  4      p\        R\        P
                  ! V P                  4      4      V P                  ,          pV P                  V8  d   RpW$3# TpV P                  pV) p V P                  V4      p\         P                  ! Wx4      p	V	^ 8:  dP   V P                  WWV4      w  r«WZV,          ,           pW[V,          ,           pV ! V4      V ! V4      8  d   TpMTpRpWä3# \         P                  ! Wf4      pWù,          pVVV,          ,           p\        P                  P                  V4      V8¼  d)   V P                  WWV4      w  r«W[V,          ,           pRpWä3# VVV,          ,           p\         P                  ! VV4      p\        P
                  ! V4      V8  d   RpVV3# VV,          pV) VV,          ,           pTpTpTpEKc  )a$  
Solve the subproblem using a conjugate gradient method.

Parameters
----------
trust_radius : float
    We are allowed to wander only this far away from the origin.

Returns
-------
p : ndarray
    The proposed step.
hits_boundary : bool
    True if the proposed step is on the boundary of the trust region.

Notes
-----
This is algorithm (7.2) of Nocedal and Wright 2nd edition.
Only the function that computes the Hessian-vector product is required.
The Hessian itself is not required, and the Hessian does
not need to be positive semidefinite.
g      à?FT)ÚnpÚ
zeros_liker   ÚminÚmathÚsqrtÚjac_magr   ÚdotÚget_boundaries_intersectionsÚscipyÚlinalgÚnorm)ÚselfÚtrust_radiusÚp_originÚ	toleranceÚhits_boundaryÚzÚrÚdÚBdÚdBdÚtaÚtbÚpaÚpbÚ
p_boundaryÚ	r_squaredÚalphaÚz_nextÚr_nextÚr_next_squaredÚ	beta_nextÚd_nexts   &&                    r   ÚsolveÚCGSteihaugSubproblem.solve,   s¹  € ô2 —=’= §¡Ó*ˆô ˜œTŸYšY t§|¡|Ó4Ó5¸¿¹ÕDˆ	ð <‰<˜)Ô#Ø!ˆMØÐ*Ð*ð ˆØH‰HˆØˆBˆð ð —‘˜A“ˆBÜ—&’&˜“-ˆCØaŒxð
 ×:Ñ:¸1ÀÓN‘Ø˜a•ZØ˜a•ZÙ˜“8™d 2›hÔ&Ø!#‘Jà!#JØ $Ø!Ð0Ð0ÜŸš˜q›ˆIØ•OˆEØ˜ •]ˆFÜ|‰|× Ñ  Ó(¨LÔ8ð ×:Ñ:¸1ÀÓN‘Ø a¥Z
Ø $Ø!Ð0Ð0Ø˜ •^ˆFÜŸVšV F¨FÓ3ˆNÜyŠy˜Ó(¨9Ô4Ø %Ø˜}Ð,Ð,Ø&¨Õ2ˆIØW˜y¨1}Õ,ˆFð ˆAØˆAØ‹Ar   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r5   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   *   s   ø‡ € ÙD÷Rð Rr   r   )r7   NNN)r<   r   Únumpyr   Úscipy.linalgr   Ú_trustregionr   r   Ú__all__r   r   r7   r   r   Ú<module>rD      s-   ðÙ *Û ã Û ß Kà
€ô:ô>TÐ2ö Tr   