glato / emerge

Emerge is a browser-based interactive codebase and dependency visualization tool for many different programming languages. It supports some basic code quality and graph metrics and provides a simple and intuitive way to explore and analyze a codebase by using graph structures.
MIT License
783 stars 46 forks source link

question: louvain-modularity, entity #7

Closed kargaranamir closed 3 years ago

kargaranamir commented 3 years ago

Hiiii again, Louvain method considers the edge weights in its formula, I wanted to know if there is a weight for the edges in emerge graph code? It makes sense that this weight should be equal to the number of calls.

Also, what is meant by an entity? If we want to consider both public and private classes, can't we get a more logical metric?

glato commented 3 years ago

Hi @kargaranamir, emerge itself does not feature edge weights (yet), since the relationships between either the files, or entities (e.g. a class or a struct, depending on the language implementation) are currently implemented in a unary way, i. e. either there is a relationship (e.g. an import dependency) or there is none.

A more fine-grained implementation would be great, if you have some time and would like to contribute, I'd appreciate any contribution and love to hear your ideas 😉.

kargaranamir commented 3 years ago

That sounds interesting, I will have some time to work on it. First, I will try to figure out how it implemented so far. Thank you so much.

glato commented 3 years ago

Hi @kargaranamir, to give you further technical/background about those things: emerge uses the library python-louvain to actually create sets of communities by using the Louvain method. This is done on the base of NetworkX as the actual graph representation. Hope this helps a bit more to better understand the context.