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

NaiveGreedyModularityAlgorithm and GreedyModularityAlgorithm #1160

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

toniaTsif
Copy link

I added the implementation of Naive Greedy Modularity Algorithm and Greedy Modularity Algorithm, as they were missing from JGraphT. This algorithm is a greedy community detection algorithm, which uses modularity in order to define the communities. The implementation of the Greedy Modularity Algorithm was based on the paper "Finding community structure in very large networks" by Clauset, Newman and Moore.

@jsichi
Copy link
Member

jsichi commented Aug 27, 2023

Thank you for your contribution! Checkstyle produced the following errors, so you will need to set up your editor according to our guidelines in order to avoid these.

https://github.com/jgrapht/jgrapht/wiki/Dev-guide%3A-How-to-setup-your-development-environment-for-JGraphT

Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[53,1] (whitespace) FileTabCharacter: File contains tab characters (this is the first instance).
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[76,40] (extension) LocalVariableNameMain: Name 'DQ' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[108,61] (extension) LocalVariableNameMain: Name 'DQHeap' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[109,60] (extension) LocalVariableNameMain: Name 'DQHeapHandles' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[183,48] (extension) LocalVariableNameMain: Name 'DQik' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[184,48] (extension) LocalVariableNameMain: Name 'DQjk' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[187,48] (extension) LocalVariableNameMain: Name 'DQik' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithm.java:[190,48] (extension) LocalVariableNameMain: Name 'DQjk' must match pattern '^[a-z][a-zA-Z0-9]*$'.
Error:  src/main/java/org/jgrapht/alg/clustering/NaiveGreedyModularityAlgorithm.java:[1] (misc) NewlineAtEndOfFile: File does not end with a newline.
Error:  src/main/java/org/jgrapht/alg/clustering/NaiveGreedyModularityAlgorithm.java:[45,1] (whitespace) FileTabCharacter: File contains tab characters (this is the first instance).
Error:  src/test/java/org/jgrapht/alg/clustering/NaiveGreedyModularityAlgorithmTest.java:[36,1] (whitespace) FileTabCharacter: File contains tab characters (this is the first instance).
Error:  src/test/java/org/jgrapht/alg/clustering/GreedyModularityAlgorithmTest.java:[35,1] (whitespace) FileTabCharacter: File contains tab characters (this is the first instance).

@d-michail
Copy link
Member

Hi Tonia,

please adjust the source files to contain spaces instead of tabs and a new line at the end. Also please rename (refactor) the variables to start with a lowercase, for example DQik to dQik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants