Skip to content

Commit e0eeef6

Browse files
Merge branch 'dev'
2 parents 267fba5 + f2572e9 commit e0eeef6

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

CHANGELOG.md

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

3+
## [1.0.5] - 2022 September 29
4+
* Fixed `/src/leidenalg/include/MutableVertexPartition.h`, Fedora-related 'GLIBCXX_ASSERTIONS' error
5+
36
## [1.0.4] - 2022 September 25
47
* Remove 'Matrix.utils' as dependency
58

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: leidenAlg
22
Type: Package
33
Title: Implements the Leiden Algorithm via an R Interface
4-
Version: 1.0.4
4+
Version: 1.0.5
55
Authors@R: c(person("Peter", "Kharchenko", email = "Peter_Kharchenko@hms.harvard.edu", role = c("aut")), person("Viktor", "Petukhov", email = "viktor.s.petukhov@ya.ru", role = c("aut")), person("V.A.", "Traag", email = "v.a.traag@cwts.leidenuniv.nl", role = c("ctb")), person("Gábor", "Csárdi", email = "sardi.gabor@gmail.com", role = c("ctb")), person("Tamás", "Nepusz", email = "ntamas@gmail.com", role = c("ctb")), person("Minh Van", "Nguyen", email = "nguyenminh2@gmail.com", role = c("ctb")), person("Evan", "Biederstedt", email = "evan.biederstedt@gmail.com", role=c("cre", "aut")))
66
Description: An R interface to the Leiden algorithm, an iterative community detection algorithm on networks. The algorithm is designed to converge to a partition in which all subsets of all communities are locally optimally assigned, yielding communities guaranteed to be connected. The implementation proves to be fast, scales well, and can be run on graphs of millions of nodes (as long as they can fit in memory). The original implementation was constructed as a python interface "leidenalg" found here: <https://github.com/vtraag/leidenalg>. The algorithm was originally described in Traag, V.A., Waltman, L. & van Eck, N.J. "From Louvain to Leiden: guaranteeing well-connected communities". Sci Rep 9, 5233 (2019) <doi:10.1038/s41598-019-41695-z>.
77
License: GPL-3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ If you find `leidenAlg` useful for your publication, please cite:
8484
```
8585
Peter Kharchenko, Viktor Petukhov and Evan Biederstedt (2021).
8686
leidenAlg: Implements the Leiden Algorithm via an R Interface. R
87-
package version 1.0.3. https://github.com/kharchenkolab/leidenAlg
87+
package version 1.0.5. https://github.com/kharchenkolab/leidenAlg
8888
```

src/leidenalg/include/MutableVertexPartition.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ class MutableVertexPartition
8989

9090
void from_partition(MutableVertexPartition* partition);
9191

92-
inline double total_weight_in_comm(size_t comm) { return this->_total_weight_in_comm[comm]; };
93-
inline double total_weight_from_comm(size_t comm) { return this->_total_weight_from_comm[comm]; };
94-
inline double total_weight_to_comm(size_t comm) { return this->_total_weight_to_comm[comm]; };
92+
inline double total_weight_in_comm(size_t comm) { return comm < _n_communities ? this->_total_weight_in_comm[comm] : 0.0; };
93+
inline double total_weight_from_comm(size_t comm) { return comm < _n_communities ? this->_total_weight_from_comm[comm] : 0.0; };
94+
inline double total_weight_to_comm(size_t comm) { return comm < _n_communities ? this->_total_weight_to_comm[comm] : 0.0; };
95+
9596
inline double total_weight_in_all_comms() { return this->_total_weight_in_all_comms; };
9697
inline size_t total_possible_edges_in_all_comms() { return this->_total_possible_edges_in_all_comms; };
9798

0 commit comments

Comments
 (0)