twitter / cassovary

Cassovary is a simple big graph processing library for the JVM
http://twitter.com/cassovary
Apache License 2.0
1.05k stars 150 forks source link

Degree centrality #138

Closed bmckown closed 9 years ago

bmckown commented 9 years ago

This PR is the beginning of building out the analysis framework to allow more metrics to be computed on the graph. We start with the simplest, in-degree and out-degree centrality, and will move to more complicated centrality algorithm and iterative algorithms such as HITS.

pankajgupta commented 9 years ago

Will review in a day. @AnishShah @szymonm @plofgren -- Pls feel free to review as well:

bmckown commented 9 years ago

Updated with changes. Waiting to hear from @pankajgupta to advise on normalization calculation. Thanks for the comments gentlemen! Very much appreciated.

pankajgupta commented 9 years ago

I am not sure why you think nodeCount won't include a disconnected node. It should. Did you run into this somewhere? If so, please provide example and we will file it as a bug to be fixed.

The problem with using maxNodeId is that there might be nodes numbered say 1,4 and 1000. Then maxNodeId will be 1000.

On Fri, Jan 30, 2015 at 7:30 AM, Ben McKown notifications@github.com wrote:

Updated with changes. Waiting to hear from @pankajgupta https://github.com/pankajgupta to advise on normalization calculation. Thanks for the comments gentlemen! Very much appreciated.

— Reply to this email directly or view it on GitHub https://github.com/twitter/cassovary/pull/138#issuecomment-72218386.

bmckown commented 9 years ago

Updated with correct normalization by nodeCount. Thanks @pankajgupta!

bmckown commented 9 years ago

Updated and refactored. Let me know what you think!

bmckown commented 9 years ago

Updated.

pankajgupta commented 9 years ago

Thanks for being patient with all the comments. This is ready to merge post the PR https://github.com/twitter/cassovary/pull/137 is merged (which is a breaking api change to ArrayBasedDirectedGraph so you will need to modify TestGraph slightly).

bmckown commented 9 years ago

Thank you for being patient! I appreciate all of the comments. I will modify TestGraph once PR #137 is merged. Thanks for the heads up.

pankajgupta commented 9 years ago

https://github.com/twitter/cassovary/pull/137 is now in master

bmckown commented 9 years ago

Updated.