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

LouvainCore why consider edgeData (or weight) as Long only? #79

Open
5abhim opened this issue Dec 24, 2014 · 1 comment
Open

LouvainCore why consider edgeData (or weight) as Long only? #79

5abhim opened this issue Dec 24, 2014 · 1 comment

Comments

@5abhim
Copy link

5abhim commented Dec 24, 2014

EdgeData (or Edge Weight) could be a double as well.
What is the significance of internalWeight and nodeWeight in LouvainCore class? and how will they change when edge weight changes to Double from Long?

@eric-kimbrel
Copy link
Contributor

nodeWeight is the weighted degree of a node (sum of all edge weights).

internalWeight represents the sum of all self edge weights. This is typically 0 when starting the algorithm but after a compression stage (where all nodes of a single community are compressed down to a single node) there will be many self edges. Rather than representing the self edges as true edges in the graph framework (which would increase memory and computation required) we simply keep a sum of all the self edges for calculations when it is needed.

Both nodeWeight and internalEdgeWeight would need to change to Double if you changed edge weight to Double. Also we would want to check the "q" method to ensure the computation and variable types are still correct.

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

No branches or pull requests

2 participants