Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Louvain algorithm for undirected graphs #1277

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
77746f5
create `community` module, stubs for `modularity` and helper functions
jpacold Jul 4, 2024
bd1ee6c
implement `_total_edge_weight`
jpacold Jul 4, 2024
6ada2b9
implement modularity function
jpacold Jul 7, 2024
75f2570
add Rust test, fix modularity calculation
jpacold Jul 7, 2024
dc444d6
Merge branch 'Qiskit:main' into louvain
jpacold Jul 7, 2024
cb7fd50
add test for directed case
jpacold Jul 8, 2024
1f24463
Merge branch 'Qiskit:main' into louvain
jpacold Aug 6, 2024
561ab21
Merge branch 'Qiskit:main' into louvain
jpacold Aug 21, 2024
b2f181c
use associate type bounds to simplify `where` clauses, use `HashSet` …
jpacold Aug 22, 2024
3568a76
create `struct Partition`
jpacold Aug 23, 2024
b986a8e
Move modularity calculation to `Partition`
jpacold Aug 23, 2024
0bcd747
Add struct for Louvain algorithm
jpacold Aug 26, 2024
fb3faea
Minimal working version for undirected graphs
jpacold Sep 1, 2024
ab976fb
Use random seed argument
jpacold Sep 1, 2024
5fcb89e
Merge branch 'Qiskit:main' into louvain
jpacold Sep 1, 2024
c75ec5f
Merge branch 'louvain' of https://github.com/jpacold/rustworkx into l…
jpacold Sep 1, 2024
e0fed65
Start factoring out helper functions, use NodeIndexable for some code…
jpacold Sep 3, 2024
2609291
Use Vec instead of HashMap where possible
jpacold Sep 4, 2024
12f5364
Clean up `Partition`
jpacold Sep 4, 2024
fda816c
Avoid copying the whole input graph on the first pass
jpacold Sep 4, 2024
611d08a
Add comments
jpacold Sep 4, 2024
885045c
Make `InnerGraph` an enum
jpacold Sep 5, 2024
7a2301c
Separate Louvain algorithm code from modularity code
jpacold Sep 5, 2024
c0e2de3
Add karate club test
jpacold Sep 5, 2024
df684f6
Merge branch 'Qiskit:main' into louvain
jpacold Sep 5, 2024
b3fad58
Remove redundant argument from `one_level_undirected`
jpacold Sep 5, 2024
e399a8b
Fix mistake in gain calculation: update current community degrees, no…
jpacold Sep 9, 2024
ae3d19c
Use degree of node instead of degree of community
jpacold Sep 9, 2024
bc976b4
Update karate club test
jpacold Sep 9, 2024
12ffc33
Use closure for repeated part of gain calculation
jpacold Sep 9, 2024
234659e
Replace `loop` with `while performed_move`
jpacold Sep 9, 2024
11a74fd
Replace `if let` with `match`
jpacold Sep 9, 2024
58857fd
Reorganize modularity and gain arithmetic
jpacold Sep 10, 2024
e77f71c
Revise traits to compile with Rust 1.70
jpacold Sep 16, 2024
6f49cae
`cargo fmt --all`
jpacold Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading