Logo ROOT   6.18/05
Reference Guide
mndscal.cxx
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10/* dscal.f -- translated by f2c (version 20010320).
11 You must link the resulting object file with the libraries:
12 -lf2c -lm (in that order)
13*/
14
15namespace ROOT {
16
17 namespace Minuit2 {
18
19
20int Mndscal(unsigned int n, double da, double* dx, int incx) {
21 /* System generated locals */
22 int i__1, i__2;
23
24 /* Local variables */
25 int i__, m, nincx, mp1;
26
27
28 /* scales a vector by a constant. */
29 /* uses unrolled loops for increment equal to one. */
30 /* jack dongarra, linpack, 3/11/78. */
31 /* modified 3/93 to return if incx .le. 0. */
32 /* modified 12/3/93, array(1) declarations changed to array(*) */
33
34
35 /* Parameter adjustments */
36 --dx;
37
38 /* Function Body */
39 if (n <= 0 || incx <= 0) {
40 return 0;
41 }
42 if (incx == 1) {
43 goto L20;
44 }
45
46 /* code for increment not equal to 1 */
47
48 nincx = n * incx;
49 i__1 = nincx;
50 i__2 = incx;
51 for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
52 dx[i__] = da * dx[i__];
53 /* L10: */
54 }
55 return 0;
56
57 /* code for increment equal to 1 */
58
59
60 /* clean-up loop */
61
62L20:
63 m = n % 5;
64 if (m == 0) {
65 goto L40;
66 }
67 i__2 = m;
68 for (i__ = 1; i__ <= i__2; ++i__) {
69 dx[i__] = da * dx[i__];
70 /* L30: */
71 }
72 if (n < 5) {
73 return 0;
74 }
75L40:
76 mp1 = m + 1;
77 i__2 = n;
78 for (i__ = mp1; i__ <= i__2; i__ += 5) {
79 dx[i__] = da * dx[i__];
80 dx[i__ + 1] = da * dx[i__ + 1];
81 dx[i__ + 2] = da * dx[i__ + 2];
82 dx[i__ + 3] = da * dx[i__ + 3];
83 dx[i__ + 4] = da * dx[i__ + 4];
84 /* L50: */
85 }
86 return 0;
87} /* dscal_ */
88
89 } // namespace Minuit2
90
91} // namespace ROOT
const Int_t n
Definition: legend1.C:16
int Mndscal(unsigned int, double, double *, int)
Definition: mndscal.cxx:20
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
auto * m
Definition: textangle.C:8