about summary refs log tree commit diff
path: root/sourcecodes/localscore/stats_package.h
diff options
context:
space:
mode:
authorziejd22017-09-14 15:39:41 -0500
committerziejd22017-09-14 15:57:50 -0500
commitc4f926438dcb8abe805e910399940f79ff643c4b (patch)
tree3146d05ada5cf4b48d9bdd16c1baa498e8df7192 /sourcecodes/localscore/stats_package.h
parent57ebf49403b75dcf8482d174b59f7fd2a961d98e (diff)
downloadBNW-c4f926438dcb8abe805e910399940f79ff643c4b.tar.gz
Add files via upload
Diffstat (limited to 'sourcecodes/localscore/stats_package.h')
-rw-r--r--sourcecodes/localscore/stats_package.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/sourcecodes/localscore/stats_package.h b/sourcecodes/localscore/stats_package.h
new file mode 100644
index 00000000..3717c482
--- /dev/null
+++ b/sourcecodes/localscore/stats_package.h
@@ -0,0 +1,71 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2007  The R Core Team.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as published by
+ *  the Free Software Foundation; either version 2.1 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this program; if not, a copy is available at
+ *  http://www.r-project.org/Licenses/
+ */
+
+#ifndef R_STATS_PACKAGE_H
+#define R_STATS_PACKAGE_H
+#include <Rconfig.h>
+
+#ifdef HAVE_VISIBILITY_ATTRIBUTE
+# define attribute_hidden __attribute__ ((visibility ("hidden")))
+#else
+# define attribute_hidden
+#endif
+
+enum AlgType {NREG = 1, OPT = 2};
+				/* 0-based indices into v */
+enum  VPos {F = 9, F0 = 12, FDIF = 10, G = 27, HC = 70};
+				/* 0-based indices into iv */
+enum IVPos {AI = 90, AM = 94, ALGSAV = 50, COVMAT = 25,
+	    COVPRT = 13, COVREQ = 14, DRADPR = 100,
+	    DTYPE = 15, IERR = 74, INITH = 24, INITS = 24,
+	    IPIVOT = 75, IVNEED =  2, LASTIV = 42, LASTV = 44,
+	    LMAT =  41, MXFCAL = 16, MXITER = 17, NEXTV  = 46,
+	    NFCALL =  5, NFCOV = 51, NFGCAL = 6, NGCOV = 52,
+	    NITER = 30, NVDFLT = 49, NVSAVE = 8, OUTLEV = 18,
+	    PARPRT = 19, PARSAV = 48, PERM = 57, PRUNIT = 20,
+	    QRTYP = 79, RDREQ = 56, RMAT = 77, SOLPRT = 21,
+	    STATPR = 22, TOOBIG = 1, VNEED = 3, VSAVE = 59,
+	    X0PRT = 23};
+
+void attribute_hidden
+S_Rf_divset(int alg, int iv[], int liv, int lv, double v[]);
+
+void attribute_hidden
+S_nlsb_iterate(double b[], double d[], double dr[], int iv[],
+	       int liv, int lv, int n, int nd, int p,
+	       double r[], double rd[], double v[], double x[]);
+
+void attribute_hidden
+S_nlminb_iterate(double b[], double d[], double fx, double g[],
+		 double h[], int iv[], int liv, int lv, int n,
+		 double v[], double x[]);
+
+static R_INLINE int S_v_length(int alg, int n)
+{
+    return (alg - 1) ? (105 + (n * (2 * n + 20))) :
+	(130 + (n * (n + 27))/2);
+}
+
+static R_INLINE int S_iv_length(int alg, int n)
+{
+    return (alg - 1) ? (82 + 4 * n) : (78 + 3 * n);
+}
+
+#endif /* R_STATS_PACKAGE_H */
+