diff --git a/.gitattributes b/.gitattributes index bdb0cab..cf42ace 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,11 @@ # Auto detect text files and perform LF normalization * text=auto +# Lines added from https://github.com/krlmlr/r-appveyor/blob/master/.gitattributes +data/* binary +src/* text=lf +R/* text=lf + # Custom for Visual Studio *.cs diff=csharp diff --git a/R/RcppExports.R b/R/RcppExports.R index 5a66f3d..ba3e602 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -144,6 +144,10 @@ rgraph_ba_new_cpp <- function(m0 = 1L, m = 1L, t = 10L) { .Call('netdiffuseR_rgraph_ba_new_cpp', PACKAGE = 'netdiffuseR', m0, m, t) } +persistant <- function(graph, i, j, n) { + .Call('netdiffuseR_persistant', PACKAGE = 'netdiffuseR', graph, i, j, n) +} + rgraph_er_cpp <- function(n = 10L, p = 0.3, undirected = TRUE, weighted = FALSE, self = FALSE) { .Call('netdiffuseR_rgraph_er_cpp', PACKAGE = 'netdiffuseR', n, p, undirected, weighted, self) } diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..7d1c45b --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,41 @@ +# DO NOT CHANGE the "init" and "install" sections below + +# Download script file from GitHub +init: + ps: | + $ErrorActionPreference = "Stop" + Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" + Import-Module '..\appveyor-tool.ps1' + +install: + ps: Bootstrap + +# Adapt as necessary starting from here + +build_script: + - travis-tool.sh install_deps + +test_script: + - travis-tool.sh run_tests + +on_failure: + - travis-tool.sh dump_logs + +artifacts: + - path: '*.Rcheck\**\*.log' + name: Logs + + - path: '*.Rcheck\**\*.out' + name: Logs + + - path: '*.Rcheck\**\*.fail' + name: Logs + + - path: '*.Rcheck\**\*.Rout' + name: Logs + + - path: '\*_*.tar.gz' + name: Bits + + - path: '\*_*.zip' + name: Bits diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 55655e4..1b3180d 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -199,6 +199,20 @@ BEGIN_RCPP return __result; END_RCPP } +// persistant +double persistant(const List& graph, int i, int j, int n); +RcppExport SEXP netdiffuseR_persistant(SEXP graphSEXP, SEXP iSEXP, SEXP jSEXP, SEXP nSEXP) { +BEGIN_RCPP + Rcpp::RObject __result; + Rcpp::RNGScope __rngScope; + Rcpp::traits::input_parameter< const List& >::type graph(graphSEXP); + Rcpp::traits::input_parameter< int >::type i(iSEXP); + Rcpp::traits::input_parameter< int >::type j(jSEXP); + Rcpp::traits::input_parameter< int >::type n(nSEXP); + __result = Rcpp::wrap(persistant(graph, i, j, n)); + return __result; +END_RCPP +} // rgraph_er_cpp arma::sp_mat rgraph_er_cpp(int n, double p, bool undirected, bool weighted, bool self); RcppExport SEXP netdiffuseR_rgraph_er_cpp(SEXP nSEXP, SEXP pSEXP, SEXP undirectedSEXP, SEXP weightedSEXP, SEXP selfSEXP) {