source: Sophya/trunk/SophyaExt/CodeMinuit/code/mncalf.F

Last change on this file was 2403, checked in by cmv, 22 years ago

Creation du module de code source de MINUIT (CERNLIB) extrait par CMV

cmv 11/06/2003

File size: 1.1 KB
Line 
1*
2* $Id: mncalf.F,v 1.1.1.1 2003-06-11 14:18:26 cmv Exp $
3*
4* $Log: not supported by cvs2svn $
5* Revision 1.1.1.1 1996/03/07 14:31:28 mclareni
6* Minuit
7*
8*
9#include "minuit/pilot.h"
10 SUBROUTINE MNCALF(FCN,PVEC,YCALF,FUTIL)
11#include "minuit/d506dp.inc"
12CC Called only from MNIMPR. Transforms the function FCN
13CC by dividing out the quadratic part in order to find further
14CC minima. Calculates ycalf = (f-fmin)/(x-xmin)*v*(x-xmin)
15CC
16#include "minuit/d506cm.inc"
17 EXTERNAL FCN,FUTIL
18 DIMENSION PVEC(15)
19 NPARX = NPAR
20 CALL MNINEX(PVEC)
21 CALL FCN(NPARX,GIN,F,U,4,FUTIL)
22 NFCN = NFCN + 1
23 DO 200 I= 1, NPAR
24 GRD(I) = 0.
25 DO 200 J= 1, NPAR
26 M = MAX(I,J)
27 N = MIN(I,J)
28 NDEX = M*(M-1)/2 + N
29 200 GRD(I) = GRD(I) + VTHMAT(NDEX) * (XT(J)-PVEC(J))
30 DENOM = 0.
31 DO 210 I= 1, NPAR
32 210 DENOM = DENOM + GRD(I) * (XT(I)-PVEC(I))
33 IF (DENOM .LE. ZERO) THEN
34 DCOVAR = 1.
35 ISW(2) = 0
36 DENOM = 1.0
37 ENDIF
38 YCALF = (F-APSI) / DENOM
39 RETURN
40 END
Note: See TracBrowser for help on using the repository browser.