Skip to content

Commit f01dd41

Browse files
committed
CRAN v 1.19.0
1 parent c84aa22 commit f01dd41

5 files changed

Lines changed: 11 additions & 28 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
dist: trusty
22
language: r
33
sudo: false
4-
cache: packages
54

65
r:
76
- release

R/RcppExports.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ moran_cpp <- function(x, w) {
300300
.Call(`_netdiffuseR_moran_cpp`, x, w)
301301
}
302302

303-
struct_equiv_cpp <- function(graph, v = 1.0, unscaled = FALSE, inv = FALSE, invrep = 0.0) {
304-
.Call(`_netdiffuseR_struct_equiv_cpp`, graph, v, unscaled, inv, invrep)
303+
struct_equiv_cpp <- function(graph, v = 1.0) {
304+
.Call(`_netdiffuseR_struct_equiv_cpp`, graph, v)
305305
}
306306

307307
matrix_compareCpp <- function(A, B, fun) {

cran-comments.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Test environments
22

3-
* Ubuntu 14.04 LTS (on travis-ci), R-rel 3.4.1 (2017-01-27), and R-rel 3.3.3 (2017-01-27).
4-
* Windows Server 2012 R2 x64 (on AppVeyor), R version 3.4.2 (2017-09-28), R version 3.4.2 (2017-09-28).
5-
* OS X El Capitan 10.11.6 (on travis-ci), R version 3.4.1 (2017-06-30).
3+
* Ubuntu 14.04.5 LTS 64-bit (on travis-ci), R 3.4.2, and R 3.3.3.
4+
* Windows Server 2012 R2 (on AppVeyor), R version 3.4.2 (64-bit), R version 3.3.3 (32-bit).
5+
* OS X El Capitan 10.11.6 (on travis-ci), R version 3.4.2, and R 3.3.3.
66

77
## R CMD check results
88

src/RcppExports.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -452,17 +452,14 @@ BEGIN_RCPP
452452
END_RCPP
453453
}
454454
// struct_equiv_cpp
455-
List struct_equiv_cpp(const arma::sp_mat& graph, double v, bool unscaled, bool inv, double invrep);
456-
RcppExport SEXP _netdiffuseR_struct_equiv_cpp(SEXP graphSEXP, SEXP vSEXP, SEXP unscaledSEXP, SEXP invSEXP, SEXP invrepSEXP) {
455+
List struct_equiv_cpp(const arma::sp_mat& graph, double v);
456+
RcppExport SEXP _netdiffuseR_struct_equiv_cpp(SEXP graphSEXP, SEXP vSEXP) {
457457
BEGIN_RCPP
458458
Rcpp::RObject rcpp_result_gen;
459459
Rcpp::RNGScope rcpp_rngScope_gen;
460460
Rcpp::traits::input_parameter< const arma::sp_mat& >::type graph(graphSEXP);
461461
Rcpp::traits::input_parameter< double >::type v(vSEXP);
462-
Rcpp::traits::input_parameter< bool >::type unscaled(unscaledSEXP);
463-
Rcpp::traits::input_parameter< bool >::type inv(invSEXP);
464-
Rcpp::traits::input_parameter< double >::type invrep(invrepSEXP);
465-
rcpp_result_gen = Rcpp::wrap(struct_equiv_cpp(graph, v, unscaled, inv, invrep));
462+
rcpp_result_gen = Rcpp::wrap(struct_equiv_cpp(graph, v));
466463
return rcpp_result_gen;
467464
END_RCPP
468465
}
@@ -552,7 +549,7 @@ static const R_CallMethodDef CallEntries[] = {
552549
{"_netdiffuseR_vertex_mahalanobis_dist_cpp", (DL_FUNC) &_netdiffuseR_vertex_mahalanobis_dist_cpp, 3},
553550
{"_netdiffuseR_vertex_covariate_compare", (DL_FUNC) &_netdiffuseR_vertex_covariate_compare, 3},
554551
{"_netdiffuseR_moran_cpp", (DL_FUNC) &_netdiffuseR_moran_cpp, 2},
555-
{"_netdiffuseR_struct_equiv_cpp", (DL_FUNC) &_netdiffuseR_struct_equiv_cpp, 5},
552+
{"_netdiffuseR_struct_equiv_cpp", (DL_FUNC) &_netdiffuseR_struct_equiv_cpp, 2},
556553
{"_netdiffuseR_matrix_compareCpp", (DL_FUNC) &_netdiffuseR_matrix_compareCpp, 3},
557554
{"_netdiffuseR_struct_test_mean", (DL_FUNC) &_netdiffuseR_struct_test_mean, 3},
558555
{"_netdiffuseR_struct_test_var", (DL_FUNC) &_netdiffuseR_struct_test_var, 3},

src/stats.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,8 @@ List moran_cpp(const arma::colvec & x, const arma::sp_mat & w) {
190190
// [[Rcpp::export]]
191191
List struct_equiv_cpp(
192192
const arma::sp_mat & graph, // Must be a geodesic distances graph
193-
double v = 1.0,
194-
bool unscaled = false,
195-
bool inv = false, double invrep = 0.0) {
193+
double v = 1.0
194+
) {
196195

197196
int n = graph.n_cols;
198197
if (graph.n_cols != graph.n_rows) stop("-graph- is not square.");
@@ -217,16 +216,10 @@ List struct_equiv_cpp(
217216
// Adding up the results
218217
d.at(i,j) = pow(pow(graph.at(i,j) - graph.at(j,i), 2.0) + sumik + sumki, 0.5 );
219218

220-
// // If only inverse required
221-
// if (inv && unscaled) d.at(i,j) = 1.0/(d.at(i,j) + 1e-15);
222-
223219
d.at(j,i) = d.at(i,j);
224220
}
225221
}
226222

227-
// // If only distance must be computed
228-
// if (unscaled) return List::create(_["SE"]=d, _["d"]=d, _["gdist"]=graph);
229-
230223
// Computing distances
231224
NumericMatrix SE(n,n);
232225

@@ -251,12 +244,6 @@ List struct_equiv_cpp(
251244
SE.at(i,j) = pow(dmax[i] - d.at(j,i), v)/(sumdmaxd + 1e-15);
252245
}
253246

254-
// // If inverse required
255-
// if (inv) {
256-
// for(int j=0;j<n;j++) {
257-
// SE.at(i,j) = 1/(SE.at(i,j) + 1e-10);
258-
// }
259-
// }
260247
}
261248

262249
return List::create(_["SE"]=SE, _["d"]=d, _["gdist"]=graph);

0 commit comments

Comments
 (0)