+
    /i%                     N    R t ^ RIt^ RIt^RIHtHt . tRR lt	 ! R R]4      t
R# )z"Dog-leg trust-region optimization.N)_minimize_trust_regionBaseQuadraticSubproblemc                    Vf   \        R4      h\        V4      '       g   \        R4      h\        W3RVRVRVR\        /VB # )a  
Minimization of scalar function of one or more variables using
the dog-leg 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 dogleg minimizationz+Hessian is required for dogleg minimizationargsjachess
subproblem)
ValueErrorcallabler   DoglegSubproblem)funx0r   r   r   trust_region_optionss   &&&&&,`/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/optimize/_trustregion_dogleg.py_minimize_doglegr   	   s^    ( {GHHD>>FGG!# : :# :D :-=:$8: :    c                   6   a  ] tR t^&t o RtR tR tR tRtV t	R# )r   z0Quadratic subproblem solved by the dogleg methodc                    V P                   f\   V P                  pV P                  V4      p\        P                  ! W4      \        P                  ! W4      ,          ) V,          V n         V P                   # )zF
The Cauchy point is minimal along the direction of steepest descent.
)_cauchy_pointr   hesspnpdot)selfgBgs   &  r   cauchy_pointDoglegSubproblem.cauchy_point)   sW     %AAB#%66!<"&&-#?!@1!DD!!!r   c                    V P                   f]   V P                  pV P                  p\        P                  P                  V4      p\        P                  P                  W14      ) V n         V P                   # )zC
The Newton point is a global minimum of the approximate function.
)_newton_pointr   r   scipylinalg
cho_factor	cho_solve)r   r   Bcho_infos   &   r   newton_pointDoglegSubproblem.newton_point3   s\     %A		A||..q1H"',,"8"8"E!ED!!!r   c                p   V P                  4       p\        P                  P                  V4      V8  d   RpW#3# V P	                  4       p\        P                  P                  V4      pWQ8  d   WAV,          ,          pRpWc3# V P                  WBV,
          V4      w  rxWHW$,
          ,          ,           pRpWc3# )a  
Minimize a function using the dog-leg trust-region algorithm.

This algorithm requires function values and first and second derivatives.
It also performs a costly Hessian decomposition for most iterations,
and the Hessian is required to be positive definite.

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
-----
The Hessian is required to be positive definite.

References
----------
.. [1] Jorge Nocedal and Stephen Wright,
       Numerical Optimization, second edition,
       Springer-Verlag, 2006, page 73.
FT)r%   r   r    normr   get_boundaries_intersections)	r   trust_radiusp_besthits_boundaryp_up_u_norm
p_boundary_tbs	   &&       r   solveDoglegSubproblem.solve>   s    D ""$<<V$|3!M(( ! <<$$S)#x 78J M,, 11#|2>@..
((r   )r   r   N)
__name__
__module____qualname____firstlineno____doc__r   r%   r2   __static_attributes____classdictcell__)__classdict__s   @r   r   r   &   s     :"	"<) <)r   r   ) NN)r8   numpyr   scipy.linalgr   _trustregionr   r   __all__r   r   r<   r   r   <module>rA      s*    (   K
::T). T)r   