root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / R_ext / stats_package.h @ 2486
History  View  Annotate  Download (2.4 kB)
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 
* http://www.rproject.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 
/* 0based indices into v */

32 
enum VPos {F = 9, F0 = 12, FDIF = 10, G = 27, HC = 70}; 
33 
/* 0based 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 