... | ... |
@@ -1,4 +1,5 @@ |
1 |
-// From several files from R package extraDistr |
|
1 |
+// Code taken from several files from R package extraDistr |
|
2 |
+// (shared.cpp, shared_inline.h, multivariate_hypergeometric.cpp) |
|
2 | 3 |
// https://github.com/twolodzko/extraDistr |
3 | 4 |
// Author: Tymoteusz Wolodzko |
4 | 5 |
// License: GPL-2 |
... | ... |
@@ -112,7 +113,8 @@ double finite_max_int(const Rcpp::NumericVector& x) { |
112 | 113 |
return max_x; |
113 | 114 |
} |
114 | 115 |
|
115 |
- |
|
116 |
+// Renaming of cpp_rmvhyper in |
|
117 |
+// https://github.com/twolodzko/extraDistr/blob/master/src/multivariate-hypergeometric-distribution.cpp |
|
116 | 118 |
Rcpp::NumericMatrix my_rmvhyper( |
117 | 119 |
const int nn, |
118 | 120 |
const Rcpp::NumericMatrix n, |
... | ... |
@@ -1,3 +1,11 @@ |
1 |
+// Code from file shared.h in the R package extraDistr |
|
2 |
+// https://github.com/twolodzko/extraDistr |
|
3 |
+// https://github.com/twolodzko/extraDistr/blob/master/src/shared.h |
|
4 |
+// Author: Tymoteusz Wolodzko |
|
5 |
+// License: GPL-2 |
|
6 |
+// Downloaded on 2020-03-18 |
|
7 |
+ |
|
8 |
+ |
|
1 | 9 |
#include <Rcpp.h> |
2 | 10 |
using namespace Rcpp ; |
3 | 11 |
using std::pow; |
... | ... |
@@ -18,4 +26,4 @@ static const double MIN_DIFF_EPS = 1e-8; |
18 | 26 |
#define GETM(x, i, j) x(i % x.nrow(), j) // wrapped indexing of matrix |
19 | 27 |
#define VALID_PROB(p) ((p >= 0.0) && (p <= 1.0)) |
20 | 28 |
|
21 |
-Rcpp::NumericMatrix my_rmvhyper(const int nn, const Rcpp::NumericMatrix n, const NumericVector k); |
|
22 | 29 |
\ No newline at end of file |
30 |
+Rcpp::NumericMatrix my_rmvhyper(const int nn, const Rcpp::NumericMatrix n, const NumericVector k); |