Révision 2476

tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Linpack.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1997        Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1999-2015   The R Core Team.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU Lesser General Public License as published by
8
 *  the Free Software Foundation; either version 2.1 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU Lesser General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU Lesser General Public License
17
 *  along with this program; if not, a copy is available at
18
 *  https://www.R-project.org/Licenses/
19
 */
20

  
21
/* 
22
   C declarations of double-precision LINPACK Fortran subroutines
23
   included in R, and some others.
24
   
25
   Those which are listed as part of R are in the API
26
 */
27

  
28
#ifndef R_LINPACK_H_
29
#define R_LINPACK_H_
30

  
31
#include <R_ext/RS.h>		/* for F77_... */
32
#include <R_ext/BLAS.h>
33

  
34
#ifdef  __cplusplus
35
extern "C" {
36
#endif
37

  
38
	/* Double Precision LINPACK */
39

  
40
extern void F77_NAME(dpbfa)(double*, int*, int*, int*, int*);
41
extern void F77_NAME(dpbsl)(double*, int*, int*, int*, double*);
42
extern void F77_NAME(dpoco)(double*, int*, int*, double*, double*, int*);
43
extern void F77_NAME(dpodi)(double*, int*, int*, double*, int*);
44
extern void F77_NAME(dpofa)(double*, int*, int*, int*);
45
extern void F77_NAME(dposl)(double*, int*, int*, double*);
46
extern void F77_NAME(dqrdc)(double*, int*, int*, int*, double*, int*, double*, int*);
47
extern void F77_NAME(dqrsl)(double*, int*, int*, int*, double*, double*, double*, double*, double*, double*, double*, int*, int*);
48
extern void F77_NAME(dsvdc)(double*, int*, int*, int*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
49
extern void F77_NAME(dtrco)(double*, int*, int*, double*, double*, int*);
50
extern void F77_NAME(dtrsl)(double*, int*, int*, double*, int*, int*);
51

  
52

  
53
/* The following routines are listed as they have always been declared
54
   here, but they are not currently included in R */
55
extern void F77_NAME(dchdc)(double*, int*, int*, double*, int*, int*, int*);
56
extern void F77_NAME(dchdd)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*, int*);
57
extern void F77_NAME(dchex)(double*, int*, int*, int*, int*, double*, int*, int*, double*, double*, int*);
58
extern void F77_NAME(dchud)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*);
59
extern void F77_NAME(dgbco)(double*, int*, int*, int*, int*, int*, double*, double*);
60
extern void F77_NAME(dgbdi)(double*, int*, int*, int*, int*, int*, double*);
61
extern void F77_NAME(dgbfa)(double*, int*, int*, int*, int*, int*, int*);
62
extern void F77_NAME(dgbsl)(double*, int*, int*, int*, int*, int*, double*, int*);
63
extern void F77_NAME(dgeco)(double*, int*, int*, int*, double*, double*);
64
extern void F77_NAME(dgedi)(double*, int*, int*, int*, double*, double*, int*);
65
extern void F77_NAME(dgefa)(double*, int*, int*, int*, int*);
66
extern void F77_NAME(dgesl)(double*, int*, int*, int*, double*, int*);
67
extern void F77_NAME(dgtsl)(int*, double*, double*, double*, double*, int*);
68
extern void F77_NAME(dpbco)(double*, int*, int*, int*, double*, double*, int*);
69
extern void F77_NAME(dpbdi)(double*, int*, int*, int*, double*);
70
extern void F77_NAME(dppco)(double*, int*, double*, double*, int*);
71
extern void F77_NAME(dppdi)(double*, int*, double*, int*);
72
extern void F77_NAME(dppfa)(double*, int*, int*);
73
extern void F77_NAME(dppsl)(double*, int*, double*);
74
extern void F77_NAME(dptsl)(int*, double*, double*, double*);
75
extern void F77_NAME(dsico)(double*, int*, int*, int*, double*, double*);
76
extern void F77_NAME(dsidi)(double*, int*, int*, int*, double*, int*, double*, int*);
77
extern void F77_NAME(dsifa)(double*, int*, int*, int*, int*);
78
extern void F77_NAME(dsisl)(double*, int*, int*, int*, double*);
79
extern void F77_NAME(dspco)(double*, int*, int*, double*, double*);
80
extern void F77_NAME(dspdi)(double*, int*, int*, double*, int*, double*, int*);
81
extern void F77_NAME(dspfa)(double*, int*, int*, int*);
82
extern void F77_NAME(dspsl)(double*, int*, int*, double*);
83

  
84
#ifdef  __cplusplus
85
}
86
#endif
87

  
88
#endif /* R_LINPACK_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/BLAS.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2003-12 The R Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/*
21
   C declarations of BLAS Fortran subroutines always available in R.
22

  
23
   Part of the API.
24

  
25
   R packages that use these should have PKG_LIBS in src/Makevars include 
26
   $(BLAS_LIBS) $(FLIBS)
27
 */
28

  
29
/* Part of the API */
30

  
31
#ifndef R_BLAS_H
32
#define R_BLAS_H
33

  
34
#include <R_ext/RS.h>		/* for F77_... */
35
#include <R_ext/Complex.h>	/* for Rcomplex */
36

  
37
#ifdef  __cplusplus
38
extern "C" {
39
#endif
40

  
41
// never defined in R itself.
42
#ifndef BLAS_extern
43
#define BLAS_extern extern
44
#endif
45

  
46
/* Double Precision Level 1 BLAS */
47

  
48
BLAS_extern double /* DASUM - sum of absolute values of a one-dimensional array */
49
F77_NAME(dasum)(const int *n, const double *dx, const int *incx);
50
BLAS_extern void   /* DAXPY - replace y by alpha*x + y */
51
F77_NAME(daxpy)(const int *n, const double *alpha,
52
		const double *dx, const int *incx,
53
		double *dy, const int *incy);
54
BLAS_extern void   /* DCOPY - copy x to y */
55
F77_NAME(dcopy)(const int *n, const double *dx, const int *incx,
56
		double *dy, const int *incy);
57
BLAS_extern double /* DDOT - inner product of x and y */
58
F77_NAME(ddot)(const int *n, const double *dx, const int *incx,
59
	       const double *dy, const int *incy);
60
BLAS_extern double /* DNRM2 - 2-norm of a vector */
61
F77_NAME(dnrm2)(const int *n, const double *dx, const int *incx);
62
BLAS_extern void   /* DROT - apply a Given's rotation */
63
F77_NAME(drot)(const int *n, double *dx, const int *incx,
64
	       double *dy, const int *incy, const double *c, const double *s);
65
BLAS_extern void   /* DROTG - generate a Given's rotation */
66
F77_NAME(drotg)(const double *a, const double *b, double *c, double *s);
67
BLAS_extern void   /* DROTM - apply a modified Given's rotation */
68
F77_NAME(drotm)(const int *n, double *dx, const int *incx,
69
		double *dy, const int *incy, const double *dparam);
70
BLAS_extern void   /* DROTMG - generate a modified Given's rotation */
71
F77_NAME(drotmg)(const double *dd1, const double *dd2, const double *dx1,
72
		 const double *dy1, double *param);
73
BLAS_extern void   /* DSCAL - scale a one-dimensional array */
74
F77_NAME(dscal)(const int *n, const double *alpha, double *dx, const int *incx);
75
BLAS_extern void   /* DSWAP - interchange one-dimensional arrays */
76
F77_NAME(dswap)(const int *n, double *dx, const int *incx,
77
		double *dy, const int *incy);
78
BLAS_extern int    /* IDAMAX - return the index of the element with max abs value */
79
F77_NAME(idamax)(const int *n, const double *dx, const int *incx);
80

  
81
/* Double Precision Level 2 BLAS */
82

  
83
/* DGBMV - perform one of the matrix-vector operations */
84
/* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, */
85
BLAS_extern void
86
F77_NAME(dgbmv)(const char *trans, const int *m, const int *n,
87
		const int *kl,const int *ku,
88
		const double *alpha, const double *a, const int *lda,
89
		const double *x, const int *incx,
90
		const double *beta, double *y, const int *incy);
91
/* DGEMV - perform one of the matrix-vector operations */
92
/* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,  */
93
BLAS_extern void
94
F77_NAME(dgemv)(const char *trans, const int *m, const int *n,
95
		const double *alpha, const double *a, const int *lda,
96
		const double *x, const int *incx, const double *beta,
97
		double *y, const int *incy);
98
/* DSBMV - perform the matrix-vector operation */
99
/* y := alpha*A*x + beta*y, */
100
BLAS_extern void
101
F77_NAME(dsbmv)(const char *uplo, const int *n, const int *k,
102
		const double *alpha, const double *a, const int *lda,
103
		const double *x, const int *incx,
104
		const double *beta, double *y, const int *incy);
105
/* DSPMV - perform the matrix-vector operation */
106
/* y := alpha*A*x + beta*y, */
107
BLAS_extern void
108
F77_NAME(dspmv)(const char *uplo, const int *n,
109
		const double *alpha, const double *ap,
110
		const double *x, const int *incx,
111
		const double *beta, double *y, const int *incy);
112

  
113
/* DSYMV - perform the matrix-vector operation */
114
/*  y := alpha*A*x + beta*y, */
115
BLAS_extern void
116
F77_NAME(dsymv)(const char *uplo, const int *n, const double *alpha,
117
		const double *a, const int *lda,
118
		const double *x, const int *incx,
119
		const double *beta, double *y, const int *incy);
120
/* DTBMV - perform one of the matrix-vector operations */
121
/* x := A*x, or x := A'*x, */
122
BLAS_extern void
123
F77_NAME(dtbmv)(const char *uplo, const char *trans,
124
		const char *diag, const int *n, const int *k,
125
		const double *a, const int *lda,
126
		double *x, const int *incx);
127
/* DTPMV - perform one of the matrix-vector operations */
128
/* x := A*x, or x := A'*x, */
129
BLAS_extern void
130
F77_NAME(dtpmv)(const char *uplo, const char *trans, const char *diag,
131
		const int *n, const double *ap,
132
		double *x, const int *incx);
133
/* DTRMV - perform one of the matrix-vector operations  */
134
/* x := A*x, or x := A'*x, */
135
BLAS_extern void
136
F77_NAME(dtrmv)(const char *uplo, const char *trans, const char *diag,
137
		const int *n, const double *a, const int *lda,
138
		double *x, const int *incx);
139
/* DTBSV - solve one of the systems of equations */
140
/* A*x = b, or A'*x = b, */
141
BLAS_extern void
142
F77_NAME(dtbsv)(const char *uplo, const char *trans,
143
		const char *diag, const int *n, const int *k,
144
		const double *a, const int *lda,
145
		double *x, const int *incx);
146
/* DTPSV - solve one of the systems of equations */
147
/* A*x = b, or A'*x = b, */
148
BLAS_extern void
149
F77_NAME(dtpsv)(const char *uplo, const char *trans,
150
		const char *diag, const int *n,
151
		const double *ap, double *x, const int *incx);
152
/* DTRSV - solve one of the systems of equations */
153
/* A*x = b, or A'*x = b, */
154
BLAS_extern void
155
F77_NAME(dtrsv)(const char *uplo, const char *trans,
156
		const char *diag, const int *n,
157
		const double *a, const int *lda,
158
		double *x, const int *incx);
159
/* DGER - perform the rank 1 operation   A := alpha*x*y' + A */
160
BLAS_extern void
161
F77_NAME(dger)(const int *m, const int *n, const double *alpha,
162
	       const double *x, const int *incx,
163
	       const double *y, const int *incy,
164
	       double *a, const int *lda);
165
/* DSYR - perform the symmetric rank 1 operation A := alpha*x*x' + A */
166
BLAS_extern void
167
F77_NAME(dsyr)(const char *uplo, const int *n, const double *alpha,
168
	       const double *x, const int *incx,
169
	       double *a, const int *lda);
170
/* DSPR - perform the symmetric rank 1 operation A := alpha*x*x' + A */
171
BLAS_extern void
172
F77_NAME(dspr)(const char *uplo, const int *n, const double *alpha,
173
	       const double *x, const int *incx, double *ap);
174
/* DSYR2 - perform the symmetric rank 2 operation */
175
/* A := alpha*x*y' + alpha*y*x' + A, */
176
BLAS_extern void
177
F77_NAME(dsyr2)(const char *uplo, const int *n, const double *alpha,
178
		const double *x, const int *incx,
179
		const double *y, const int *incy,
180
		double *a, const int *lda);
181
/* DSPR2 - perform the symmetric rank 2 operation */
182
/* A := alpha*x*y' + alpha*y*x' + A,  */
183
BLAS_extern void
184
F77_NAME(dspr2)(const char *uplo, const int *n, const double *alpha,
185
		const double *x, const int *incx,
186
		const double *y, const int *incy, double *ap);
187

  
188
/* Double Precision Level 3 BLAS */
189

  
190
/* DGEMM - perform one of the matrix-matrix operations    */
191
/* C := alpha*op( A )*op( B ) + beta*C */
192
BLAS_extern void
193
F77_NAME(dgemm)(const char *transa, const char *transb, const int *m,
194
		const int *n, const int *k, const double *alpha,
195
		const double *a, const int *lda,
196
		const double *b, const int *ldb,
197
		const double *beta, double *c, const int *ldc);
198
/* DTRSM - solve one of the matrix equations  */
199
/* op(A)*X = alpha*B, or  X*op(A) = alpha*B  */
200
BLAS_extern void
201
F77_NAME(dtrsm)(const char *side, const char *uplo,
202
		const char *transa, const char *diag,
203
		const int *m, const int *n, const double *alpha,
204
		const double *a, const int *lda,
205
		double *b, const int *ldb);
206
/* DTRMM - perform one of the matrix-matrix operations */
207
/* B := alpha*op( A )*B, or B := alpha*B*op( A ) */
208
BLAS_extern void
209
F77_NAME(dtrmm)(const char *side, const char *uplo, const char *transa,
210
		const char *diag, const int *m, const int *n,
211
		const double *alpha, const double *a, const int *lda,
212
		double *b, const int *ldb);
213
/* DSYMM - perform one of the matrix-matrix operations   */
214
/*  C := alpha*A*B + beta*C, */
215
BLAS_extern void
216
F77_NAME(dsymm)(const char *side, const char *uplo, const int *m,
217
		const int *n, const double *alpha,
218
		const double *a, const int *lda,
219
		const double *b, const int *ldb,
220
		const double *beta, double *c, const int *ldc);
221
/* DSYRK - perform one of the symmetric rank k operations */
222
/* C := alpha*A*A' + beta*C or C := alpha*A'*A + beta*C */
223
BLAS_extern void
224
F77_NAME(dsyrk)(const char *uplo, const char *trans,
225
		const int *n, const int *k,
226
		const double *alpha, const double *a, const int *lda,
227
		const double *beta, double *c, const int *ldc);
228
/* DSYR2K - perform one of the symmetric rank 2k operations */
229
/* C := alpha*A*B' + alpha*B*A' + beta*C or */
230
/* C := alpha*A'*B + alpha*B'*A + beta*C */
231
BLAS_extern void
232
F77_NAME(dsyr2k)(const char *uplo, const char *trans,
233
		 const int *n, const int *k,
234
		 const double *alpha, const double *a, const int *lda,
235
		 const double *b, const int *ldb,
236
		 const double *beta, double *c, const int *ldc);
237
/*
238
  LSAME is a LAPACK support routine, not part of BLAS
239
*/
240

  
241
/* Double complex BLAS routines added for 2.3.0 */
242
/* #ifdef HAVE_FORTRAN_DOUBLE_COMPLEX */
243
    BLAS_extern double
244
    F77_NAME(dcabs1)(double *z);
245
    BLAS_extern double
246
    F77_NAME(dzasum)(int *n, Rcomplex *zx, int *incx);
247
    BLAS_extern double
248
    F77_NAME(dznrm2)(int *n, Rcomplex *x, int *incx);
249
    BLAS_extern int
250
    F77_NAME(izamax)(int *n, Rcomplex *zx, int *incx);
251
    BLAS_extern void
252
    F77_NAME(zaxpy)(int *n, Rcomplex *za, Rcomplex *zx,
253
		    int *incx, Rcomplex *zy, int *incy);
254
    BLAS_extern void
255
    F77_NAME(zcopy)(int *n, Rcomplex *zx, int *incx,
256
		    Rcomplex *zy, int *incy);
257

  
258
    /* WARNING!  The next two return a value that may not be
259
       compatible between C and Fortran, and even if it is, this might
260
       not be the right translation to C.  Only use after
261
       configure-testing with your compilers.
262
     */
263
    BLAS_extern Rcomplex
264
    F77_NAME(zdotc)(int *n,
265
		    Rcomplex *zx, int *incx, Rcomplex *zy, int *incy);
266
    BLAS_extern Rcomplex
267
    F77_NAME(zdotu)(int *n,
268
		    Rcomplex *zx, int *incx, Rcomplex *zy, int *incy);
269

  
270
    BLAS_extern void
271
    F77_NAME(zdrot)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy,
272
		int *incy, double *c, double *s);
273
    BLAS_extern void
274
    F77_NAME(zdscal)(int *n, double *da, Rcomplex *zx, int *incx);
275
    BLAS_extern void
276
    F77_NAME(zgbmv)(char *trans, int *m, int *n, int *kl,
277
		    int *ku, Rcomplex *alpha, Rcomplex *a, int *lda,
278
		    Rcomplex *x, int *incx, Rcomplex *beta, Rcomplex *y,
279
		    int *incy);
280
    BLAS_extern void
281
    F77_NAME(zgemm)(const char *transa, const char *transb, const int *m,
282
		    const int *n, const int *k, const Rcomplex *alpha,
283
		    const Rcomplex *a, const int *lda,
284
		    const Rcomplex *b, const int *ldb,
285
		    const Rcomplex *beta, Rcomplex *c, const int *ldc);
286
    BLAS_extern void
287
    F77_NAME(zgemv)(char *trans, int *m, int *n, Rcomplex *alpha,
288
		    Rcomplex *a, int *lda, Rcomplex *x, int *incx,
289
		    Rcomplex *beta, Rcomplex *y, int * incy);
290
    BLAS_extern void
291
    F77_NAME(zgerc)(int *m, int *n, Rcomplex *alpha, Rcomplex *x,
292
		    int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda);
293
    BLAS_extern void
294
    F77_NAME(zgeru)(int *m, int *n, Rcomplex *alpha, Rcomplex *x,
295
		    int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda);
296
    BLAS_extern void
297
    F77_NAME(zhbmv)(char *uplo, int *n, int *k, Rcomplex *alpha,
298
		    Rcomplex *a, int *lda, Rcomplex *x, int *incx,
299
		    Rcomplex *beta, Rcomplex *y, int *incy);
300
    BLAS_extern void
301
    F77_NAME(zhemm)(char *side, char *uplo, int *m, int *n,
302
		    Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
303
		    int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc);
304
    BLAS_extern void
305
    F77_NAME(zhemv)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *a,
306
		    int *lda, Rcomplex *x, int *incx, Rcomplex *beta,
307
		    Rcomplex *y, int *incy);
308
    BLAS_extern void
309
    F77_NAME(zher)(char *uplo, int *n, double *alpha, Rcomplex *x,
310
		   int *incx, Rcomplex *a, int *lda);
311
    BLAS_extern void
312
    F77_NAME(zher2)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *x,
313
		    int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda);
314
    BLAS_extern void
315
    F77_NAME(zher2k)(char *uplo, char *trans, int *n, int *k,
316
		     Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
317
		     int *ldb, double *beta, Rcomplex *c, int *ldc);
318
    BLAS_extern void
319
    F77_NAME(zherk)(char *uplo, char *trans, int *n, int *k,
320
		    double *alpha, Rcomplex *a, int *lda, double *beta,
321
		    Rcomplex *c, int *ldc);
322
    BLAS_extern void
323
    F77_NAME(zhpmv)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *ap,
324
		    Rcomplex *x, int *incx, Rcomplex * beta, Rcomplex *y,
325
		    int *incy);
326
    BLAS_extern void
327
    F77_NAME(zhpr)(char *uplo, int *n, double *alpha,
328
		   Rcomplex *x, int *incx, Rcomplex *ap);
329
    BLAS_extern void
330
    F77_NAME(zhpr2)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *x,
331
		    int *incx, Rcomplex *y, int *incy, Rcomplex *ap);
332
    BLAS_extern void
333
    F77_NAME(zrotg)(Rcomplex *ca, Rcomplex *cb, double *c, Rcomplex *s);
334
    BLAS_extern void
335
    F77_NAME(zscal)(int *n, Rcomplex *za, Rcomplex *zx, int *incx);
336
    BLAS_extern void
337
    F77_NAME(zswap)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy);
338
    BLAS_extern void
339
    F77_NAME(zsymm)(char *side, char *uplo, int *m, int *n,
340
		    Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
341
		    int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc);
342
    BLAS_extern void
343
    F77_NAME(zsyr2k)(char *uplo, char *trans, int *n, int *k,
344
		     Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
345
		     int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc);
346
    BLAS_extern void
347
    F77_NAME(zsyrk)(char *uplo, char *trans, int *n, int *k,
348
		    Rcomplex *alpha, Rcomplex *a, int *lda,
349
		    Rcomplex *beta, Rcomplex *c, int *ldc);
350
    BLAS_extern void
351
    F77_NAME(ztbmv)(char *uplo, char *trans, char *diag, int *n, int *k,
352
		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
353
    BLAS_extern void
354
    F77_NAME(ztbsv)(char *uplo, char *trans, char *diag, int *n, int *k,
355
		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
356
    BLAS_extern void
357
    F77_NAME(ztpmv)(char *uplo, char *trans, char *diag, int *n,
358
		    Rcomplex *ap, Rcomplex *x, int *incx);
359
    BLAS_extern void
360
    F77_NAME(ztpsv)(char *uplo, char *trans, char *diag, int *n,
361
		    Rcomplex *ap, Rcomplex *x, int *incx);
362
    BLAS_extern void
363
    F77_NAME(ztrmm)(char *side, char *uplo, char *transa, char *diag,
364
		    int *m, int *n, Rcomplex *alpha, Rcomplex *a,
365
		    int *lda, Rcomplex *b, int *ldb);
366
    BLAS_extern void
367
    F77_NAME(ztrmv)(char *uplo, char *trans, char *diag, int *n,
368
		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
369
    BLAS_extern void
370
    F77_NAME(ztrsm)(char *side, char *uplo, char *transa, char *diag,
371
		    int *m, int *n, Rcomplex *alpha, Rcomplex *a,
372
		    int *lda, Rcomplex *b, int *ldb);
373
    BLAS_extern void
374
    F77_NAME(ztrsv)(char *uplo, char *trans, char *diag, int *n,
375
		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
376
/* #endif */
377

  
378
#ifdef  __cplusplus
379
}
380
#endif
381

  
382
#endif /* R_BLAS_H */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Rallocators.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2014-2016  The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 *
19
 *
20
 *  Definition of the R_allocator_t structure for custom allocators
21
 *  to be used with allocVector3()
22
 */
23

  
24
#ifndef R_EXT_RALLOCATORS_H_
25
#define R_EXT_RALLOCATORS_H_
26

  
27
#ifndef NO_C_HEADERS
28
# if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
29
#  include <cstddef>
30
# else
31
#  include <stddef.h> /* for size_t */
32
# endif
33
#else
34
#warning "use of NO_C_HEADERS is deprecated"
35
#endif
36

  
37
/* R_allocator_t typedef is also declared in Rinternals.h 
38
   so we guard against random inclusion order */
39
#ifndef R_ALLOCATOR_TYPE
40
#define R_ALLOCATOR_TYPE
41
typedef struct R_allocator R_allocator_t;
42
#endif
43

  
44
typedef void *(*custom_alloc_t)(R_allocator_t *allocator, size_t);
45
typedef void  (*custom_free_t)(R_allocator_t *allocator, void *);
46

  
47
struct R_allocator {
48
    custom_alloc_t mem_alloc; /* malloc equivalent */
49
    custom_free_t  mem_free;  /* free equivalent */
50
    void *res;                /* reserved (maybe for copy) - must be NULL */
51
    void *data;               /* custom data for the allocator implementation */
52
};
53

  
54
#endif /* R_EXT_RALLOCATORS_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Visibility.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2008    the R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/*
21
  Definitions controlling visibility on some platforms.
22

  
23
  Part of the API.
24
*/
25

  
26
#ifndef R_EXT_VISIBILITY_H_
27
#define R_EXT_VISIBILITY_H_
28

  
29
#include <Rconfig.h>
30

  
31
#ifdef HAVE_VISIBILITY_ATTRIBUTE
32
# define attribute_visible __attribute__ ((visibility ("default")))
33
# define attribute_hidden __attribute__ ((visibility ("hidden")))
34
#else
35
# define attribute_visible
36
# define attribute_hidden
37
#endif
38

  
39
#endif /* R_EXT_VISIBILITY_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Print.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1998-2010    The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/* Included by R.h: API */
21

  
22
#ifndef R_EXT_PRINT_H_
23
#define R_EXT_PRINT_H_
24

  
25
#ifdef  __cplusplus
26
/* If the vprintf interface is defined at all in C++ it may only be
27
   defined in namespace std. */
28
# ifdef R_USE_C99_IN_CXX
29
#  include <cstdarg>
30
#  ifdef __SUNPRO_CC
31
using _STLP_VENDOR_CSTD::va_list;
32
#  endif
33
# endif
34
extern "C" {
35
#else
36
# include <stdarg.h>
37
#endif
38

  
39
void Rprintf(const char *, ...);
40
void REprintf(const char *, ...);
41
#if !defined(__cplusplus) || defined R_USE_C99_IN_CXX
42
void Rvprintf(const char *, va_list);
43
void REvprintf(const char *, va_list);
44
#endif
45

  
46
#ifdef  __cplusplus
47
}
48
#endif
49

  
50
#endif /* R_EXT_PRINT_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/libextern.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2001, 2004  The R Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/* Included by R.h: API on Windows */
21

  
22
/* don't disallow including this one more than once */
23

  
24
/* This is intended to be called from other header files, so not callable
25
   from C++ */
26

  
27
#undef LibExtern
28
#undef LibImport
29
#undef LibExport
30

  
31
/* Don't try to include CYGWIN here: decorating some symbols breaks
32
   the auto-export that it relies on, even if R_DLL_BUILD were set. */
33
#ifdef _WIN32 /* _WIN32 as does not depend on config.h */
34
#define LibImport __declspec(dllimport)
35
#define LibExport __declspec(dllexport)
36
#else
37
#define LibImport
38
#define LibExport
39
#endif
40

  
41
#ifdef __MAIN__
42
#define LibExtern LibExport
43
#define extern
44
#elif defined(R_DLL_BUILD)
45
#define LibExtern extern
46
#else
47
#define LibExtern extern LibImport
48
#endif
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Utils.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1998-2016    The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 *
19
 *
20
 * Generally useful  UTILITIES  *NOT* relying on R internals (from Defn.h)
21
 */
22

  
23
/* Included by R.h: API */
24

  
25
#ifndef R_EXT_UTILS_H_
26
#define R_EXT_UTILS_H_
27

  
28
#include <R_ext/Boolean.h>
29
#include <R_ext/Complex.h>
30

  
31
#ifndef NO_C_HEADERS
32
# if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
33
#  include <cstddef>
34
using std::size_t;
35
# else
36
#  include <stddef.h>
37
# endif
38
#else
39
#warning "use of NO_C_HEADERS is deprecated"
40
#endif
41

  
42
#define revsort       Rf_revsort
43
#define iPsort        Rf_iPsort
44
#define rPsort        Rf_rPsort
45
#define cPsort        Rf_cPsort
46
#define IndexWidth    Rf_IndexWidth
47
#define setIVector    Rf_setIVector
48
#define setRVector    Rf_setRVector
49
#define StringFalse   Rf_StringFalse
50
#define StringTrue    Rf_StringTrue
51
#define isBlankString Rf_isBlankString
52

  
53
#ifdef  __cplusplus
54
extern "C" {
55
#endif
56

  
57
/* ../../main/sort.c : */
58
void	R_isort(int*, int);
59
void	R_rsort(double*, int);
60
void	R_csort(Rcomplex*, int);
61
void    rsort_with_index(double *, int *, int);
62
void	revsort(double*, int*, int);/* reverse; sort i[] alongside */
63
void	iPsort(int*,    int, int);
64
void	rPsort(double*, int, int);
65
void	cPsort(Rcomplex*, int, int);
66

  
67
/* ../../main/qsort.c : */
68
/* dummy renamed to II to avoid problems with g++ on Solaris */
69
void R_qsort    (double *v,         size_t i, size_t j);
70
void R_qsort_I  (double *v, int *II, int i, int j);
71
void R_qsort_int  (int *iv,         size_t i, size_t j);
72
void R_qsort_int_I(int *iv, int *II, int i, int j);
73
#ifdef R_RS_H
74
void F77_NAME(qsort4)(double *v, int *indx, int *ii, int *jj);
75
void F77_NAME(qsort3)(double *v,            int *ii, int *jj);
76
#endif
77

  
78
/* ../../main/util.c  and others : */
79
const char *R_ExpandFileName(const char *);
80
void	setIVector(int*, int, int);
81
void	setRVector(double*, int, double);
82
Rboolean StringFalse(const char *);
83
Rboolean StringTrue(const char *);
84
Rboolean isBlankString(const char *);
85

  
86
/* These two are guaranteed to use '.' as the decimal point,
87
   and to accept "NA".
88
 */
89
double R_atof(const char *str);
90
double R_strtod(const char *c, char **end);
91

  
92
char *R_tmpnam(const char *prefix, const char *tempdir);
93
char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext);
94

  
95
void R_CheckUserInterrupt(void);
96
void R_CheckStack(void);
97
void R_CheckStack2(size_t);
98

  
99

  
100
/* ../../appl/interv.c: also in Applic.h */
101
int findInterval(double *xt, int n, double x,
102
		 Rboolean rightmost_closed,  Rboolean all_inside, int ilo,
103
		 int *mflag);
104
int findInterval2(double *xt, int n, double x,
105
		  Rboolean rightmost_closed,  Rboolean all_inside, Rboolean left_open,
106
		  int ilo, int *mflag);
107
#ifdef R_RS_H
108
int F77_SUB(interv)(double *xt, int *n, double *x,
109
		    Rboolean *rightmost_closed, Rboolean *all_inside,
110
		    int *ilo, int *mflag);
111
#endif
112
void find_interv_vec(double *xt, int *n,	double *x,   int *nx,
113
		     int *rightmost_closed, int *all_inside, int *indx);
114

  
115
/* ../../appl/maxcol.c: also in Applic.h */
116
void R_max_col(double *matrix, int *nr, int *nc, int *maxes, int *ties_meth);
117

  
118
#ifdef  __cplusplus
119
}
120
#endif
121

  
122
#endif /* R_EXT_UTILS_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Riconv.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2005     the R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/*
21
  Interface to R's platform-independent implementation of iconv.
22

  
23
  Part of the API.
24
*/
25

  
26
#ifndef R_ICONV_H
27
#define R_ICONV_H
28

  
29
#ifdef  __cplusplus
30
extern "C" {
31
#endif
32

  
33
/* from sysutils.c */
34
#undef Riconv_open
35
#undef Riconv
36
#undef Riconv_close
37
void * Riconv_open (const char* tocode, const char* fromcode);
38
size_t Riconv (void * cd, const char **inbuf, size_t *inbytesleft,
39
	       char  **outbuf, size_t *outbytesleft);
40
int Riconv_close (void * cd);
41

  
42
#ifdef  __cplusplus
43
}
44
#endif
45

  
46
#endif /* R_ICONV_H */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/PrtUtil.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1998-2014    The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/*
21
 *  These functions are not part of the API.
22
 */
23
#ifndef PRTUTIL_H_
24
#define PRTUTIL_H_
25

  
26
#include <Rinternals.h> // for R_xlen_t
27
#include <R_ext/Complex.h>
28

  
29
#define formatLogical      Rf_formatLogical
30
#define formatInteger      Rf_formatInteger
31
#define formatReal         Rf_formatReal
32
#define formatComplex      Rf_formatComplex
33
#define EncodeLogical      Rf_EncodeLogical
34
#define EncodeInteger      Rf_EncodeInteger
35
#define EncodeReal         Rf_EncodeReal
36
#define EncodeReal0        Rf_EncodeReal0
37
#define EncodeComplex      Rf_EncodeComplex
38
#define VectorIndex        Rf_VectorIndex
39
#define printIntegerVector Rf_printIntegerVector
40
#define printRealVector    Rf_printRealVector
41
#define printComplexVector Rf_printComplexVector
42

  
43
#ifdef  __cplusplus
44
extern "C" {
45
#endif
46

  
47
/* Computation of printing formats */
48
void formatLogical(int *, R_xlen_t, int *);
49
void formatInteger(int *, R_xlen_t, int *);
50
void formatReal(double *, R_xlen_t, int *, int *, int *, int);
51
void formatComplex(Rcomplex *, R_xlen_t, int *, int *, int *, int *, int *, int *, int);
52

  
53
/* Formating of values */
54
const char *EncodeLogical(int, int);
55
const char *EncodeInteger(int, int);
56
const char *EncodeReal0(double, int, int, int, const char *);
57
const char *EncodeComplex(Rcomplex, int, int, int, int, int, int, const char *);
58

  
59
/* Legacy, misused by packages RGtk2 and qtbase */
60
const char *EncodeReal(double, int, int, int, char);
61

  
62

  
63
/* Printing */
64
int	IndexWidth(R_xlen_t);
65
void VectorIndex(R_xlen_t, int);
66

  
67
//void printLogicalVector(int *, R_xlen_t, int);
68
void printIntegerVector(int *, R_xlen_t, int);
69
void printRealVector   (double *, R_xlen_t, int);
70
void printComplexVector(Rcomplex *, R_xlen_t, int);
71

  
72
#ifdef  __cplusplus
73
}
74
#endif
75

  
76
#endif /* PRTUTIL_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/MathThreads.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2000-2014 The R Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/*
21
  Experimental: included by src/library/stats/src/distance.c
22

  
23
  Note that only uses R_num_math_threads: it is not clear
24
  R_num_math_threads should be exposed at all.
25

  
26
  This is not used currently on Windows, where R_num_math_threads
27
  used not to be exposed.
28
*/
29

  
30
#ifndef R_EXT_MATHTHREADS_H_
31
#define R_EXT_MATHTHREADS_H_
32

  
33
#ifdef  __cplusplus
34
extern "C" {
35
#endif
36

  
37
#include <R_ext/libextern.h>
38
LibExtern int R_num_math_threads;
39
LibExtern int R_max_num_math_threads;
40

  
41
#ifdef  __cplusplus
42
}
43
#endif
44

  
45
#endif /* R_EXT_MATHTHREADS_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Complex.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1998-2001   The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/* Included by R.h: API */
21

  
22
#ifndef R_COMPLEX_H
23
#define R_COMPLEX_H
24

  
25
#ifdef  __cplusplus
26
extern "C" {
27
#endif
28

  
29
typedef struct {
30
	double r;
31
	double i;
32
} Rcomplex;
33

  
34
#ifdef  __cplusplus
35
}
36
#endif
37

  
38
#endif /* R_COMPLEX_H */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Applic.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1998-2015   The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 *
19
 *
20
 * Application Routines, typically implemented in  ../appl/
21
 * ----------------------------------------------  ========
22
 */
23

  
24
/* This header file contains routines which are in the R API and ones which
25
   are not.
26

  
27
   Those which are not can be used only at the user's risk and may change
28
   or disappear in a future release of R.
29
*/
30

  
31

  
32
#ifndef R_APPLIC_H_
33
#define R_APPLIC_H_
34

  
35
#include <R_ext/Boolean.h>
36
#include <R_ext/RS.h>		/* F77_... */
37
#include <R_ext/BLAS.h>
38

  
39
#ifdef  __cplusplus
40
extern "C" {
41
#endif
42

  
43
/* Entry points in the R API */
44

  
45
/* ../../appl/integrate.c */
46
typedef void integr_fn(double *x, int n, void *ex);
47
/* vectorizing function   f(x[1:n], ...) -> x[]  {overwriting x[]}. */
48

  
49
void Rdqags(integr_fn f, void *ex, double *a, double *b,
50
	    double *epsabs, double *epsrel,
51
	    double *result, double *abserr, int *neval, int *ier,
52
	    int *limit, int *lenw, int *last, int *iwork, double *work);
53

  
54
void Rdqagi(integr_fn f, void *ex, double *bound, int *inf,
55
	    double *epsabs, double *epsrel,
56
	    double *result, double *abserr, int *neval, int *ier,
57
	    int *limit, int *lenw, int *last,
58
	    int *iwork, double *work);
59

  
60
/* main/optim.c */
61
typedef double optimfn(int, double *, void *);
62
typedef void optimgr(int, double *, double *, void *);
63

  
64
void vmmin(int n, double *b, double *Fmin,
65
	   optimfn fn, optimgr gr, int maxit, int trace,
66
	   int *mask, double abstol, double reltol, int nREPORT,
67
	   void *ex, int *fncount, int *grcount, int *fail);
68
void nmmin(int n, double *Bvec, double *X, double *Fmin, optimfn fn,
69
	   int *fail, double abstol, double intol, void *ex,
70
	   double alpha, double bet, double gamm, int trace,
71
	   int *fncount, int maxit);
72
void cgmin(int n, double *Bvec, double *X, double *Fmin,
73
	   optimfn fn, optimgr gr,
74
	   int *fail, double abstol, double intol, void *ex,
75
	   int type, int trace, int *fncount, int *grcount, int maxit);
76
void lbfgsb(int n, int m, double *x, double *l, double *u, int *nbd,
77
	    double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex,
78
	    double factr, double pgtol, int *fncount, int *grcount,
79
	    int maxit, char *msg, int trace, int nREPORT);
80
void samin(int n, double *pb, double *yb, optimfn fn, int maxit,
81
	   int tmax, double ti, int trace, void *ex);
82

  
83
/* appl/interv.c: Also in Utils.h, used in package eco */
84
int findInterval(double *xt, int n, double x,
85
		 Rboolean rightmost_closed,  Rboolean all_inside, int ilo,
86
		 int *mflag);
87
// findInterval2() is only in Utils.h (and hence Rinternals.h)
88

  
89

90
/* ------------------ Entry points NOT in the R API --------------- */
91

  
92
/* The following are registered for use in .C/.Fortran */
93

  
94
/* appl/dqrutl.f: interfaces to dqrsl */
95
void F77_NAME(dqrqty)(double *x, int *n, int *k, double *qraux,
96
		      double *y, int *ny, double *qty);
97
void F77_NAME(dqrqy)(double *x, int *n, int *k, double *qraux,
98
		     double *y, int *ny, double *qy);
99
void F77_NAME(dqrcf)(double *x, int *n, int *k, double *qraux,
100
		     double *y, int *ny, double *b, int *info);
101
void F77_NAME(dqrrsd)(double *x, int *n, int *k, double *qraux,
102
		     double *y, int *ny, double *rsd);
103
void F77_NAME(dqrxb)(double *x, int *n, int *k, double *qraux,
104
		     double *y, int *ny, double *xb);
105

  
106
/* end of registered */
107

108
/* hidden, for use in R.bin/R.dll/libR.so */
109

  
110
/* appl/pretty.c: for use in engine.c and util.c */
111
double R_pretty(double *lo, double *up, int *ndiv, int min_n,
112
		double shrink_sml, double high_u_fact[],
113
		int eps_correction, int return_bounds);
114

  
115

116
/* For use in package stats */
117

  
118
/* appl/uncmin.c : */
119

  
120
/* type of pointer to the target and gradient functions */
121
typedef void (*fcn_p)(int, double *, double *, void *);
122

  
123
/* type of pointer to the hessian functions */
124
typedef void (*d2fcn_p)(int, int, double *, double *, void *);
125

  
126
void fdhess(int n, double *x, double fval, fcn_p fun, void *state,
127
	    double *h, int nfd, double *step, double *f, int ndigit,
128
	    double *typx);
129

  
130
/* Also used in packages nlme, pcaPP */
131
void optif9(int nr, int n, double *x,
132
	    fcn_p fcn, fcn_p d1fcn, d2fcn_p d2fcn,
133
	    void *state, double *typsiz, double fscale, int method,
134
	    int iexp, int *msg, int ndigit, int itnlim, int iagflg,
135
	    int iahflg, double dlt, double gradtl, double stepmx,
136
	    double steptl, double *xpls, double *fpls, double *gpls,
137
	    int *itrmcd, double *a, double *wrk, int *itncnt);
138

  
139
/* find qr decomposition, dqrdc2() is basis of R's qr(),
140
   also used by nlme and many other packages. */
141
void F77_NAME(dqrdc2)(double *x, int *ldx, int *n, int *p,
142
		      double *tol, int *rank,
143
		      double *qraux, int *pivot, double *work);
144
void F77_NAME(dqrls)(double *x, int *n, int *p, double *y, int *ny,
145
		     double *tol, double *b, double *rsd,
146
		     double *qty, int *k,
147
		     int *jpvt, double *qraux, double *work);
148

  
149
#ifdef  __cplusplus
150
}
151
#endif
152

  
153
#endif /* R_APPLIC_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/stats_package.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2007  The R Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
#ifndef R_STATS_PACKAGE_H
21
#define R_STATS_PACKAGE_H
22
#include <Rconfig.h>
23

  
24
#ifdef HAVE_VISIBILITY_ATTRIBUTE
25
# define attribute_hidden __attribute__ ((visibility ("hidden")))
26
#else
27
# define attribute_hidden
28
#endif
29

  
30
enum AlgType {NREG = 1, OPT = 2};
31
				/* 0-based indices into v */
32
enum  VPos {F = 9, F0 = 12, FDIF = 10, G = 27, HC = 70};
33
				/* 0-based indices into iv */
34
enum IVPos {AI = 90, AM = 94, ALGSAV = 50, COVMAT = 25,
35
	    COVPRT = 13, COVREQ = 14, DRADPR = 100,
36
	    DTYPE = 15, IERR = 74, INITH = 24, INITS = 24,
37
	    IPIVOT = 75, IVNEED =  2, LASTIV = 42, LASTV = 44,
38
	    LMAT =  41, MXFCAL = 16, MXITER = 17, NEXTV  = 46,
39
	    NFCALL =  5, NFCOV = 51, NFGCAL = 6, NGCOV = 52,
40
	    NITER = 30, NVDFLT = 49, NVSAVE = 8, OUTLEV = 18,
41
	    PARPRT = 19, PARSAV = 48, PERM = 57, PRUNIT = 20,
42
	    QRTYP = 79, RDREQ = 56, RMAT = 77, SOLPRT = 21,
43
	    STATPR = 22, TOOBIG = 1, VNEED = 3, VSAVE = 59,
44
	    X0PRT = 23};
45

  
46
void attribute_hidden
47
S_Rf_divset(int alg, int iv[], int liv, int lv, double v[]);
48

  
49
void attribute_hidden
50
S_nlsb_iterate(double b[], double d[], double dr[], int iv[],
51
	       int liv, int lv, int n, int nd, int p,
52
	       double r[], double rd[], double v[], double x[]);
53

  
54
void attribute_hidden
55
S_nlminb_iterate(double b[], double d[], double fx, double g[],
56
		 double h[], int iv[], int liv, int lv, int n,
57
		 double v[], double x[]);
58

  
59
static R_INLINE int S_v_length(int alg, int n)
60
{
61
    return (alg - 1) ? (105 + (n * (2 * n + 20))) :
62
	(130 + (n * (n + 27))/2);
63
}
64

  
65
static R_INLINE int S_iv_length(int alg, int n)
66
{
67
    return (alg - 1) ? (82 + 4 * n) : (78 + 3 * n);
68
}
69

  
70
#endif /* R_STATS_PACKAGE_H */
71

  
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Constants.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998-2012   The R Core Team.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU Lesser General Public License as published by
8
 *  the Free Software Foundation; either version 2.1 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU Lesser General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU Lesser General Public License
17
 *  along with this program; if not, a copy is available at
18
 *  https://www.R-project.org/Licenses/
19
 */
20

  
21
/* Included by R.h: API */
22

  
23
#ifndef R_EXT_CONSTANTS_H_
24
#define R_EXT_CONSTANTS_H_
25

  
26
/* usually in math.h, but not with strict C99 compliance */
27
#ifndef M_PI
28
#define M_PI 3.141592653589793238462643383279502884197169399375
29
#endif
30

  
31
#ifndef STRICT_R_HEADERS
32
#define PI             M_PI
33
#include <float.h>  /* Defines the rest, at least in C99 */
34
#define SINGLE_EPS     FLT_EPSILON
35
#define SINGLE_BASE    FLT_RADIX
36
#define SINGLE_XMIN    FLT_MIN
37
#define SINGLE_XMAX    FLT_MAX
38
#define DOUBLE_DIGITS  DBL_MANT_DIG
39
#define DOUBLE_EPS     DBL_EPSILON
40
#define DOUBLE_XMAX    DBL_MAX
41
#define DOUBLE_XMIN    DBL_MIN
42
#endif
43

  
44
#endif /* R_EXT_CONSTANTS_H_ */
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/stats_stubs.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2007  The R Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
#include <Rconfig.h>
21
#include <Rinternals.h>
22
#include <R_ext/Rdynload.h>
23

  
24
#ifdef HAVE_VISIBILITY_ATTRIBUTE
25
# define attribute_hidden __attribute__ ((visibility ("hidden")))
26
#else
27
# define attribute_hidden
28
#endif
29

  
30
void attribute_hidden
31
S_Rf_divset(int alg, int iv[], int liv, int lv, double v[])
32
{
33
    static void(*fun)(int,int[],int,int,double[]) = NULL;
34
    if (fun == NULL)
35
	fun = (void(*)(int,int[],int,int,double[]))
36
	    R_GetCCallable("stats", "Rf_divset");
37
    fun(alg, iv, liv, lv, v);
38
}
39

  
40
void attribute_hidden
41
S_nlminb_iterate(double b[], double d[], double fx, double g[], double h[],
42
		 int iv[], int liv, int lv, int n, double v[], double x[])
43
{
44
    static void(*fun)(double[],double[],double,double[],double[],
45
		      int[],int,int,int,double[],double[]) = NULL;
46
    if (fun == NULL)
47
	fun = (void(*)(double[],double[],double,double[],double[],
48
			  int[],int,int,int,double[],double[]))
49
	    R_GetCCallable("stats", "nlminb_iterate");
50
    fun(b, d, fx, g, h, iv, liv, lv, n, v, x);
51
}
52

  
53
void attribute_hidden
54
S_nlsb_iterate(double b[], double d[], double dr[], int iv[], int liv,
55
	       int lv, int n, int nd, int p, double r[], double rd[],
56
	       double v[], double x[])
57
{
58
    static void(*fun)(double[],double[],double[],int[],int,int,
59
		      int,int,int,double[],double[],double[],
60
		      double[]) = NULL;
61
    if (fun == NULL)
62
	fun = (void(*)(double[],double[],double[],int[],int,
63
		       int, int,int,int,double[],
64
		       double[],double[],double[]))
65
	    R_GetCCallable("stats", "nlsb_iterate");
66
    fun(b, d, dr, iv, liv, lv, n, nd, p, r, rd, v, x);
67
}
68

  
tmp/org.txm.statsengine.r.core.macosx/res/macosx/include/R_ext/Callbacks.h (revision 2476)
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2001-2016 The R Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  https://www.R-project.org/Licenses/
18
 */
19

  
20
/* 
21
   Not part of the API, subject to change at any time.
22
*/
23

  
24
#ifndef R_CALLBACKS_H
25
#define R_CALLBACKS_H
26

  
27
/**
28
  These structures are for C (and R function) top-level task handlers.
29
  Such routines are called at the end of every (successful) top-level task
30
  in the regular REPL. 
31
 */
32

  
33
#include <Rinternals.h>
34
/**
35
  The signature of the C routine that a callback must implement.
36
  expr - the expression for the top-level task that was evaluated.
37
  value - the result of the top-level task, i.e. evaluating expr.
38
  succeeded - a logical value indicating whether the task completed propertly.
39
  visible - a logical value indicating whether the result was printed to the R ``console''/stdout.
40
  data - user-level data passed to the registration routine.
41
 */
42
typedef Rboolean (*R_ToplevelCallback)(SEXP expr, SEXP value, Rboolean succeeded, Rboolean visible, void *);
43

  
44
typedef struct _ToplevelCallback  R_ToplevelCallbackEl;
45
/** 
46
 Linked list element for storing the top-level task callbacks.
47
 */
48
struct _ToplevelCallback {
49
    R_ToplevelCallback cb; /* the C routine to call. */
50
    void *data;            /* the user-level data to pass to the call to cb() */
51
    void (*finalizer)(void *data); /* Called when the callback is removed. */
52

  
53
    char *name;  /* a name by which to identify this element. */ 
54

  
55
    R_ToplevelCallbackEl *next; /* the next element in the linked list. */
56
};
57

  
58
#ifdef __cplusplus
59
extern "C" {
60
#endif
61

  
62
Rboolean Rf_removeTaskCallbackByIndex(int id);
63
Rboolean Rf_removeTaskCallbackByName(const char *name);
64
SEXP R_removeTaskCallback(SEXP which);
65
R_ToplevelCallbackEl* Rf_addTaskCallback(R_ToplevelCallback cb, void *data, void (*finalizer)(void *), const char *name, int *pos);
66

  
67

  
68

  
69
/*
70
  The following definitions are for callbacks to R functions and
71
  methods related to user-level tables.  This was implemented in a
72
  separate package on Omegahat and these declarations allow the package
73
  to interface to the internal R code.
74
  
75
  See https://developer.r-project.org/RObjectTables.pdf,
76
  http://www.omegahat.net/RObjectTables/
77
*/
78

  
79
typedef struct  _R_ObjectTable R_ObjectTable;
80

  
81
/* Do we actually need the exists() since it is never called but R
82
   uses get to see if the symbol is bound to anything? */
83
typedef Rboolean (*Rdb_exists)(const char * const name, Rboolean *canCache, R_ObjectTable *);
84
typedef SEXP     (*Rdb_get)(const char * const name, Rboolean *canCache, R_ObjectTable *);
85
typedef int      (*Rdb_remove)(const char * const name, R_ObjectTable *);
86
typedef SEXP     (*Rdb_assign)(const char * const name, SEXP value, R_ObjectTable *);
87
typedef SEXP     (*Rdb_objects)(R_ObjectTable *);
88
typedef Rboolean (*Rdb_canCache)(const char * const name, R_ObjectTable *);
89

  
90
typedef void     (*Rdb_onDetach)(R_ObjectTable *);
91
typedef void     (*Rdb_onAttach)(R_ObjectTable *);
92

  
93
struct  _R_ObjectTable{
94
  int       type;
95
  char    **cachedNames;
96
  Rboolean  active;
97

  
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff