+
    /i:6                     `    R t ^RIHt ^RIHtHt ^RIHtHtH	t	H
t
HtHt ^ RItR tR tR tR# )a  
This module contains subroutines concerning the update of the interpolation set.

Translated from Zaikun Zhang's modern-Fortran reference implementation in PRIMA.

Dedicated to late Professor M. J. D. Powell FRS (1936--2015).

Python translation by Nickolai Belakovski.
)	DEBUGGING)DAMAGING_ROUNDINGINFO_DEFAULT)isinvmatprodoutprodinprodinvprimasumNc                   ^p\         P                  ! V4      p\         P                  ! V	^ 4      p\        '       Ed   V^ 8  g   Q hV^8  g   Q hV ^ 8  d   W^,           8:  g   Q h\        \         P                  ! V4      \         P
                  ! V4      ,          4      '       d   Q h\         P                  ! V4      \         P                  ! V4      ,          '       d   Q h\         P                  ! V4      V8X  d&   \        \         P                  ! V4      4      '       g   Q h\         P                  ! V4      \         P                  ! V4      ,          '       d   Q h\         P                  ! V^ 4      V8X  d$   \         P                  ! V^4      V^,           8X  g   Q h\         P                  ! V4      \         P
                  ! V4      ,          P                  4       '       d   Q h\         P                  ! V4      V^,           8X  dK   \        V^ \         P                  ! V4      ,          \         P                  ! V4      ,          8  4      '       d   Q h\         P                  ! V4      V^,           8X  dA   \        \         P                  ! V4      \         P                  ! V4      ,          4      '       d   Q h\         P                  ! V	^ 4      V8X  d$   \         P                  ! V	^4      V^,           8X  g   Q h\         P                  ! V	4      P                  4       '       g   Q h\        \        \        V	RRV13,          4      ^ R7      ^ 8  4      '       g   Q h\         P                  ! V
^ 4      V8X  d   \         P                  ! V
^4      V8X  g   Q h\         P                  ! V
4      P                  4       '       g   Q h\        V	RRV13,          W4      '       g   Q hV f   WgWV
\        3# T	pT
pW8  dM   WIRV 3&   WR3,          \        WR3,          V4      ,          pV
\        \        W4      V4      ,          p
VWR3&   MV	RV3;;,          V,          uu&   V	RRV13;;,          \         P                   ! WM^34      P"                  ,          uu&   \        W4      p\        V
^ R7      pV
\        VV^\%        V4      ,
          ,          4      ,          p
^p\         P&                  ! \        \        WRRV13,          4      \         P(                  ! V4      ,
          4      4      pVRV,          8  g   \         P                  ! V4      '       d   \+        V	RRV13,          4      p\         P&                  ! \        \        VV	RRV13,          4      \         P(                  ! V4      ,
          4      4      pVV8  g9   \         P                  ! V4      '       d!   \         P                  ! V4      '       g   Tp
TpVV8:  d"   WXV &   WRV 3&   W7V &   \-        W&WxW4      w  rgrp
pM
\.        pTp	Tp
\        '       Ed   \         P                  ! V^ 4      V8X  d$   \         P                  ! V^4      V^,           8X  g   Q h\         P                  ! V4      \         P
                  ! V4      ,          P                  4       '       d   Q h\         P                  ! V4      V^,           8X  dK   \        V^ \         P                  ! V4      ,          \         P                  ! V4      ,          8  4      '       d   Q h\         P                  ! V4      V^,           8X  dA   \        \         P                  ! V4      \         P                  ! V4      ,          4      '       d   Q h\         P                  ! V	^ 4      V8X  d$   \         P                  ! V	^4      V^,           8X  g   Q h\         P                  ! V	4      P                  4       '       g   Q h\        \        \        V	RRV13,          4      ^ R7      ^ 8  4      '       g   Q h\         P                  ! V
^ 4      V8X  d   \         P                  ! V
^4      V8X  g   Q h\         P                  ! V
4      P                  4       '       g   Q h\        V	RRV13,          W4      '       g   V\.        8X  g   Q hWWVV3# )za
This function revises the simplex by updating the elements of SIM, SIMI, FVAL, CONMAT, and CVAL
NNNNaxis皙?)npsizer   anyisnanisneginfisposinfallisfiniter
   absr   r   r   r   r   tileTsummaxeyer	   
updatepoler   )jdropconstrcpencstrvdfconmatcvalfvalsimsimiitolnum_constraintsnum_varssim_oldsimi_old
simi_jdropsimidsum_simierri	simi_test	erri_testinfos   &&&&&&&&&&&            ^/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/_lib/pyprima/cobyla/update.py	updatexfcr7      s    D ggfoOwwsAH y!###1}}ze!|333rxx'"++f*==>>>>HHUObkk%&88899wwqzX%#bkk!n*=*===HHQK"++a.0011wwvq!_49KxZ[|9[[[HHV$r{{6'::??AAAAwwt}1,SBHHTN@RUWU`U`aeUf@f9f5g5gggwwt}1,S$"++VZJ[9[5\5\\\wwsA(*rwwsA(Q,/NNN{{3##%%%%8CAyyL 12;a?@@@@wwtQ8+a0@H0LLL{{4 $$&&&&SIXI&3333 }Tl::GHAuH(^fT(^Q&??
(*55#AXAxKAAyyLRWWQ16888 Dq)x1s5z>:;; D66#gd9H9$569IIJKDcDjBHHTNNAyyL)*	FF3wy#a(l2CDrvvhGWWXY	trxx	7J7JDD t|U!q%xU.8tSV.]+dt  ywwvq!_49KxZ[|9[[[HHV$r{{6'::??AAAAwwt}1,SBHHTN@RUWU`U`aeUf@f9f5g5gggwwt}1,S$"++VZJ[9[5\5\\\wwsA(*rwwsA(Q,/NNN{{3##%%%%8CAyyL 12;a?@@@@wwtQ8+a0@H0LLL{{4 $$&&&&SIXI&33t?P7PPPdD$..    c                   \         P                  ! V4      ^,
          p\        '       d   V ^ 8  g   Q h\         P                  ! V4      V^,           8X  dK   \        V^ \         P                  ! V4      ,          \         P
                  ! V4      ,          8  4      '       d   Q h\         P                  ! V4      V^,           8X  dA   \        \         P                  ! V4      \         P
                  ! V4      ,          4      '       d   Q h\         P                  ! V4      ^,
          pW V,          ,           p\        V4      pWeV,          8  g+   \        WV,          8  WUV,          8*  ,          4      '       d2   \         P                  P                  WV8  R7      P                  4       p\        '       dX   V^ 8  d   WC^,           8  g   Q hWC8X  g<   WT,          WS,          8  g)   WT,          WS,          8:  d   W,          W,          8  g   Q hV# )z~
This subroutine identifies the best vertex of the current simplex with respect to the merit
function PHI = F + CPEN * CSTRV.
)mask)
r   r   r   r   r   r   minmaarrayargmin)r!   r&   r'   r,   joptphiphimins   &&&    r6   findpolerB   s   ss    wwt}q H yaxxwwt}1,SBHHTN@RUWU`U`aeUf@f9f5g5gggwwt}1,S$"++VZJ[9[5\5\\\ 774=1D

CXF D	S$d"34y8H!IJJ uu{{4V|{5<<> yqyTqL00039s}#<cmA[`d`jmqm{`{||Kr8   c                    ^pVP                   ^ ,          pVP                   ^ ,          p\        '       Ed   V^ 8  g   Q hV^8  g   Q hV ^ 8  g   Q h\        P                  ! V^ 4      V8X  d$   \        P                  ! V^4      V^,           8X  g   Q h\        P                  ! V4      \        P
                  ! V4      ,          P                  4       '       d   Q h\        P                  ! V4      V^,           8X  dK   \        V^ \        P                  ! V4      ,          \        P                  ! V4      ,          8  4      '       d   Q h\        P                  ! V4      V^,           8X  dA   \        \        P                  ! V4      \        P                  ! V4      ,          4      '       d   Q h\        P                  ! V^ 4      V8X  d$   \        P                  ! V^4      V^,           8X  g   Q h\        P                  ! V4      P                  4       '       g   Q h\        \        \        VRRV13,          4      ^ R7      ^ 8  4      '       g   Q h\        P                  ! V^ 4      V8X  d   \        P                  ! V^4      V8X  g   Q h\        P                  ! V4      P                  4       '       g   Q h\        VRRV13,          WV4      '       g   Q h\        p	\        WV4      p
VP                  4       pVP                  4       p^ T
u;8:  d   V8  d   M MVRV3;;,          VRV
3,          ,          uu&   VRV
3,          P                  4       p^ VRV
3&   VRRV13;;,          \        P                   ! W^34      P"                  ,          uu&   \        V^ R7      ) WZR3&   \        P$                  ! \        \'        WTRRV13,          4      \        P(                  ! V4      ,
          4      4      p^pVRV,          8  g   \        P                  ! V4      '       d   \+        VRRV13,          4      p\        P$                  ! \        \'        WRRV13,          4      \        P(                  ! V4      ,
          4      4      pVV8  g9   \        P                  ! V4      '       d!   \        P                  ! V4      '       g   TpTpW8:  dB   ^ T
u;8:  d   V8  d2   M M9W8V
.,          W:V.&   VRW.3,          VRW.3&   W(V
.,          W*V.&   M
\,        p	TpTp\        '       Ed   \        WV4      V8X  g   V	\,        8X  g   Q h\        P                  ! V^ 4      V8X  d$   \        P                  ! V^4      V^,           8X  g   Q h\        P                  ! V4      \        P
                  ! V4      ,          P                  4       '       d   Q h\        P                  ! V4      V^,           8X  dK   \        V^ \        P                  ! V4      ,          \        P                  ! V4      ,          8  4      '       d   Q h\        P                  ! V4      V^,           8X  dA   \        \        P                  ! V4      \        P                  ! V4      ,          4      '       d   Q h\        P                  ! V^ 4      V8X  d$   \        P                  ! V^4      V^,           8X  g   Q h\        P                  ! V4      P                  4       '       g   Q h\        \        \        VRRV13,          4      ^ R7      ^ 8  4      '       g   Q h\        P                  ! V^ 4      V8X  d   \        P                  ! V^4      V8X  g   Q h\        P                  ! V4      P                  4       '       g   Q h\        VRRV13,          WV4      '       g   V	\,        8X  g   Q hWW4WY3# )   r   Nr   r   )shaper   r   r   r   r   r   r   r   r   r
   r   r   r   rB   copyr   r   r   r   r   r	   r   )r!   r%   r&   r'   r(   r)   r*   r+   r,   r5   r?   r-   r.   sim_joptr2   r3   r4   s   &&&&&&           r6   r   r      s    6 D ll1oOyy|H y!###1}}axxwwvq!_49KxZ[|9[[[HHV$r{{6'::??AAAAwwt}1,SBHHTN@RUWU`U`aeUf@f9f5g5gggwwt}1,S$"++VZJ[9[5\5\\\wwsA(*rwwsA(Q,/NNN{{3##%%%%8CAyyL 12;a?@@@@wwtQ8+a0@H0LLL{{4 $$&&&&SIXI&3333 D D%D
 hhjGyy{HD8 	AxKC4L(q$w<$$&AtGAyyLRWWX!}=??? "$Q//1W 66#gd9H9$569IIJKDDcDjBHHTNNAyyL)*	FF3wya(l2CDrvvhGWWXY	trxx	7J7JDD
 |x%)T*:%;D!"*0X4D1D*EF1t&&'%)T*:%;D!"  yD)X5AR9RRRwwvq!_49KxZ[|9[[[HHV$r{{6'::??AAAAwwt}1,SBHHTN@RUWU`U`aeUf@f9f5g5gggwwt}1,S$"++VZJ[9[5\5\\\wwsA(*rwwsA(Q,/NNN{{3##%%%%8CAyyL 12;a?@@@@wwtQ8+a0@H0LLL{{4 $$&&&&SIXI&33t?P7PPPD..r8   )__doc__common.constsr   common.infosr   r   common.linalgr   r   r   r   r	   r
   numpyr   r7   rB   r    r8   r6   <module>rN      s.    & : J J `/D'TD/r8   