+
    Y°³jN  ã                   óR   € R t ^ RIt^RIHtHtHtHt ^RIH	t	H
t
 R tR tR tR tR# )a  
This is a module evaluating the objective/constraint function with Nan/Inf handling.

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.
N)ÚFUNCMAXÚ	CONSTRMAXÚREALMAXÚ	DEBUGGING)ÚmatprodÚprimasumc                óz   € ^ V \         P                  ! V 4      &   \         P                  ! V \        ) \        4      p V # )ze
This function moderates a decision variable. It replaces NaN by 0 and Inf/-Inf by
REALMAX/-REALMAX.
)ÚnpÚisnanÚclipr   )Úxs   &Úh/home/luca/screen-checking/.venv/lib/python3.14/site-packages/scipy/_external/pyprima/common/evaluate.pyÚ	moderatexr      s.   € ð
 €A„b‡h‚hˆqƒk�NÜ
�Š�”G�8œWÓ%€AØ€Hó    c                ó�   € \         P                  ! V 4      '       d   \        MT p \         P                  ! V \        ) \        4      p V # )z
This function moderates the function value of a MINIMIZATION problem. It replaces
NaN and any value above FUNCMAX by FUNCMAX.
)r	   r
   r   r   r   )Úfs   &r   Ú	moderatefr      s2   € ô
 —8’8˜A—;’;� A€AÜ
�Š�”G�8œWÓ%€Að €Hr   c                ó‚   € \         P                  ! V R\        R7       \         P                  ! V \        ) \        4      p V # )zÏ
This function moderates the constraint value, the constraint demanding this value
to be NONNEGATIVE. It replaces any value below -CONSTRMAX by -CONSTRMAX, and any
NaN or value above CONSTRMAX by CONSTRMAX.
F)ÚcopyÚnan)r	   Ú
nan_to_numr   r   )Úcs   &r   Ú	moderatecr   '   s-   € ô ‡M‚M�!˜%¤YÕ/Ü
�Š�”I�:œyÓ)€AØ€Hr   c                ó  € Ve   \        V4      M^ p\        '       d(   \        \        P                  ! V4      4      '       d   Q h\        P
                  ! WR,           4      pVe    \        WP                  4      V,
          VRV% \        \        P                  ! V4      4      '       d*   \        V4      p\        P                  ! V4      V,          pM0V ! \        V4      4      w  qvVR% \        V4      p\        WeR 4      WeR% \        '       d}   \        P                  ! V4      '       g   \        P                  ! V4      '       d   Q h\        \        P                  ! V4      \        P                  ! V4      ,          4      '       d   Q hWv3# )z›
This function evaluates CALCFC at X, returning the objective function value and the
constraint value. Nan/Inf are handled by a moderated extreme barrier.
N)Úlenr   Úanyr	   r
   Úzerosr   ÚTr   Úonesr   r   r   Úisposinf)Úcalcfcr   Úm_nlconÚamatÚbvecÚm_lconÚconstrr   s   &&&&&   r   Úevaluater&   2   s%  € ð Ò*ŒS�ŒY°€F÷ ƒyô ”r—x’x “{×#Ò#Ð#Ð#ô �XŠX�fÕ&Ó'€FØÒÜ! !§V¡VÓ,¨tÕ3ˆˆw�ˆä
Œ2�8Š8�A‹;×Òô �Q‹KˆÜ—’˜Ó! AÕ%‰á#¤I¨a£LÓ1Ñˆ�&�'ˆ?ô
 �a‹LˆÜ# F¨7 OÓ4ˆˆwˆ÷ ƒyô —H’H˜Q—K’K¤2§;¢;¨q§>¢>Ð2Ð2Ü”r—x’x Ó'¬"¯+ª+°fÓ*=Õ=×>Ò>Ð>Ð>àˆ9Ðr   )Ú__doc__Únumpyr	   Úconstsr   r   r   r   Úlinalgr   r   r   r   r   r&   © r   r   Ú<module>r,      s,   ðñó ß :Ó :ß %ò
ò	òô1r   