Skip to content

Commit

Permalink
Update docs and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
randef1ned committed Jan 13, 2024
1 parent b36e2bb commit f27a211
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 7 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: lint

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr, local::.
needs: lint

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ src/tests/netreg_benchmarks*
src/tests/netreg_tests*
src/test
src/netReg.dSYM/*
src/Makevars
src/stamp-h1
src/**/*.o
src/**/*.a
Expand Down
7 changes: 3 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ Type: Package
Title: Network Diffusion Algorithms
Version: 0.2.1
Date: 2018-04-20
Authors@R: c(person("Simon", "Dirmeier",
Authors@R: person("Simon", "Dirmeier",
email = "simon.dirmeier@gmx.de",
role = c("aut")),
person("Yinchun", "Su", email = "me@yinchun.su", role = c("ctb", "cre")))
role = c("aut", "cre"))
Maintainer: Simon Dirmeier <simon.dirmeier@gmx.de>
Description: Implementation of network diffusion algorithms such as
heat diffusion or Markov random walks. Network diffusion algorithms generally
Expand All @@ -18,7 +17,7 @@ Description: Implementation of network diffusion algorithms such as
URL: https://github.com/randef1ned/diffusr
BugReports: https://github.com/randef1ned/diffusr/issues
License: GPL (>=3)
Depends: R (>= 3.4)
Depends: R (>= 4.0)
LazyData: TRUE
LinkingTo: Rcpp, RcppEigen
biocViews: sparseMatrixStats
Expand Down
1 change: 1 addition & 0 deletions R/mat_util.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ colSums3 <- function(mat, is.sparse = NULL) {
} else {
sums <- colSums2(mat)
}
return(sums)
}
2 changes: 1 addition & 1 deletion R/mrw.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#' nodes, such that the random walk gets not biased to nodes with high
#' degree. In that case the original input matrix will be normalized as:
#' \deqn{ P(j | i) = \dfrac{1}{\text{degree}(i)} \times
#' \min \left(1, \dfrac{\text{degree}(j)}{\text{degree}(i)}\right)}
#' \min \left(1, \dfrac{\text{degree}(i)}{\text{degree}(j)}\right)}
#' \emph{Note that this will not consider edge weights.}
#'
#' @param allow.ergodic Allow multiple components in a graph.
Expand Down
2 changes: 1 addition & 1 deletion man/random.walk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
## no user-facing library. The include path to headers is already set by R.
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS)

## With R 3.1.0 or later, you can uncomment the following line to tell R to
## enable compilation with C++11 (or even C++14) where available
## R 4.0.0 made C++11 the default, R 4.1.0 switched to C++14, R 4.3.0 to C++17
## _In general_ we should no longer need to set a standard as any recent R
## installation will do the right thing. Should you need it, uncomment it and
## set the appropriate value, possibly CXX17.
CXX_STD = CXX17

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
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 comments on commit f27a211

Please sign in to comment.