Skip to content

Commit f27a211

Browse files
committed
Update docs and bug fixes
1 parent b36e2bb commit f27a211

File tree

7 files changed

+52
-7
lines changed

7 files changed

+52
-7
lines changed

.github/workflows/lint.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: lint
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- uses: r-lib/actions/setup-r@v2
20+
with:
21+
use-public-rspm: true
22+
23+
- uses: r-lib/actions/setup-r-dependencies@v2
24+
with:
25+
extra-packages: any::lintr, local::.
26+
needs: lint
27+
28+
- name: Lint
29+
run: lintr::lint_package()
30+
shell: Rscript {0}
31+
env:
32+
LINTR_ERROR_ON_LINT: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ src/tests/netreg_benchmarks*
77
src/tests/netreg_tests*
88
src/test
99
src/netReg.dSYM/*
10-
src/Makevars
1110
src/stamp-h1
1211
src/**/*.o
1312
src/**/*.a

DESCRIPTION

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ Type: Package
33
Title: Network Diffusion Algorithms
44
Version: 0.2.1
55
Date: 2018-04-20
6-
Authors@R: c(person("Simon", "Dirmeier",
6+
Authors@R: person("Simon", "Dirmeier",
77
email = "simon.dirmeier@gmx.de",
8-
role = c("aut")),
9-
person("Yinchun", "Su", email = "me@yinchun.su", role = c("ctb", "cre")))
8+
role = c("aut", "cre"))
109
Maintainer: Simon Dirmeier <simon.dirmeier@gmx.de>
1110
Description: Implementation of network diffusion algorithms such as
1211
heat diffusion or Markov random walks. Network diffusion algorithms generally
@@ -18,7 +17,7 @@ Description: Implementation of network diffusion algorithms such as
1817
URL: https://github.com/randef1ned/diffusr
1918
BugReports: https://github.com/randef1ned/diffusr/issues
2019
License: GPL (>=3)
21-
Depends: R (>= 3.4)
20+
Depends: R (>= 4.0)
2221
LazyData: TRUE
2322
LinkingTo: Rcpp, RcppEigen
2423
biocViews: sparseMatrixStats

R/mat_util.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,5 @@ colSums3 <- function(mat, is.sparse = NULL) {
159159
} else {
160160
sums <- colSums2(mat)
161161
}
162+
return(sums)
162163
}

R/mrw.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#' nodes, such that the random walk gets not biased to nodes with high
5555
#' degree. In that case the original input matrix will be normalized as:
5656
#' \deqn{ P(j | i) = \dfrac{1}{\text{degree}(i)} \times
57-
#' \min \left(1, \dfrac{\text{degree}(j)}{\text{degree}(i)}\right)}
57+
#' \min \left(1, \dfrac{\text{degree}(i)}{\text{degree}(j)}\right)}
5858
#' \emph{Note that this will not consider edge weights.}
5959
#'
6060
#' @param allow.ergodic Allow multiple components in a graph.

man/random.walk.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Makevars

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
2+
## no user-facing library. The include path to headers is already set by R.
3+
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS)
4+
5+
## With R 3.1.0 or later, you can uncomment the following line to tell R to
6+
## enable compilation with C++11 (or even C++14) where available
7+
## R 4.0.0 made C++11 the default, R 4.1.0 switched to C++14, R 4.3.0 to C++17
8+
## _In general_ we should no longer need to set a standard as any recent R
9+
## installation will do the right thing. Should you need it, uncomment it and
10+
## set the appropriate value, possibly CXX17.
11+
CXX_STD = CXX17
12+
13+
PKG_CPPFLAGS = -w -I../inst/include/ -I/opt/intel/oneapi/mkl/latest/include/ -I/usr/include/mkl -Wno-ignored-attributes -DMKL_ILP64 -m64 -DRCPP_USE_UNWIND_PROTECT -fopenmp -O3 -march=native -fno-math-errno -mfma
14+
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl

0 commit comments

Comments
 (0)