CXXR (C++ R)
stats_stubs.h
1 /*CXXR $Id: stats_stubs.h 1348 2013-02-25 17:49:03Z arr $
2  *CXXR
3  *CXXR This file is part of CXXR, a project to refactor the R interpreter
4  *CXXR into C++. It may consist in whole or in part of program code and
5  *CXXR documentation taken from the R project itself, incorporated into
6  *CXXR CXXR (and possibly MODIFIED) under the terms of the GNU General Public
7  *CXXR Licence.
8  *CXXR
9  *CXXR CXXR is Copyright (C) 2008-13 Andrew R. Runnalls, subject to such other
10  *CXXR copyrights and copyright restrictions as may be stated below.
11  *CXXR
12  *CXXR CXXR is not part of the R project, and bugs and other issues should
13  *CXXR not be reported via r-bugs or other R project channels; instead refer
14  *CXXR to the CXXR website.
15  *CXXR */
16 
17 /*
18  * R : A Computer Language for Statistical Data Analysis
19  * Copyright (C) 2007 The R Core Team.
20  *
21  * This program is free software; you can redistribute it and/or modify
22  * it under the terms of the GNU Lesser General Public License as published by
23  * the Free Software Foundation; either version 2.1 of the License, or
24  * (at your option) any later version.
25  *
26  * This program is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  * GNU Lesser General Public License for more details.
30  *
31  * You should have received a copy of the GNU Lesser General Public License
32  * along with this program; if not, a copy is available at
33  * http://www.r-project.org/Licenses/
34  */
35 
36 #ifndef STATS_STUBS_H
37 #define STATS_STUBS_H 1
38 
39 #include <Rconfig.h>
40 #include <Rinternals.h>
41 #include <R_ext/Rdynload.h>
42 
43 #ifdef HAVE_VISIBILITY_ATTRIBUTE
44 # define attribute_hidden __attribute__ ((visibility ("hidden")))
45 #else
46 # define attribute_hidden
47 #endif
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 void attribute_hidden
54 S_Rf_divset(int alg, int iv[], int liv, int lv, double v[])
55 {
56  static void(*fun)(int,int[],int,int,double[]) = NULL;
57  if (fun == NULL)
58  fun = (void(*)(int,int[],int,int,double[]))
59  R_GetCCallable("stats", "Rf_divset");
60  fun(alg, iv, liv, lv, v);
61 }
62 
63 void attribute_hidden
64 S_nlminb_iterate(double b[], double d[], double fx, double g[], double h[],
65  int iv[], int liv, int lv, int n, double v[], double x[])
66 {
67  static void(*fun)(double[],double[],double,double[],double[],
68  int[],int,int,int,double[],double[]) = NULL;
69  if (fun == NULL)
70  fun = (void(*)(double[],double[],double,double[],double[],
71  int[],int,int,int,double[],double[]))
72  R_GetCCallable("stats", "nlminb_iterate");
73  fun(b, d, fx, g, h, iv, liv, lv, n, v, x);
74 }
75 
76 void attribute_hidden
77 S_nlsb_iterate(double b[], double d[], double dr[], int iv[], int liv,
78  int lv, int n, int nd, int p, double r[], double rd[],
79  double v[], double x[])
80 {
81  static void(*fun)(double[],double[],double[],int[],int,int,
82  int,int,int,double[],double[],double[],
83  double[]) = NULL;
84  if (fun == NULL)
85  fun = (void(*)(double[],double[],double[],int[],int,
86  int, int,int,int,double[],
87  double[],double[],double[]))
88  R_GetCCallable("stats", "nlsb_iterate");
89  fun(b, d, dr, iv, liv, lv, n, nd, p, r, rd, v, x);
90 }
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* STATS_STUBS_H */