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

Change/Improve values of vertex-type and edge-type constants #110

Closed
clhunsen opened this issue Mar 23, 2018 · 1 comment
Closed

Change/Improve values of vertex-type and edge-type constants #110

clhunsen opened this issue Mar 23, 2018 · 1 comment

Comments

@clhunsen
Copy link
Collaborator

Description

The vertex and edge types as defined in util-networks.R are currently defined as magic numbers (historically coming from vector indices), but we should refactor them to be of type character. This way, we are able to actually "read" the vertex and edge attributes without any lookup.

https://github.com/se-passau/codeface-extraction-r/blob/34b9d35617e0d043d86a457b56d2ebc0a5ef02cd/util-networks.R#L31-L40

Proposed Solution

## vertex types
TYPE.AUTHOR = "Developer"
TYPE.ARTIFACT = "Artifact"

## edge types
TYPE.EDGES.INTRA = "Unipartite"
TYPE.EDGES.INTER = "Bipartite"

The solution should work out-of-the-box, so no changes to the test suite or any other parts of the code base are needed; that is why we use constants!

The solution is inspired by the plot module.

Possible problems

  • The motif identification works on numerics for the vertex encoding (see here)
  • The plotting module may need some treating, clean-up as well as fixes.

Versions

Any version as of now.


What is your opinion on the naming?

@clhunsen clhunsen added this to the v3.2 milestone Mar 23, 2018
@clhunsen clhunsen self-assigned this Mar 23, 2018
@clhunsen clhunsen modified the milestones: v3.2, 3.1.2 Mar 23, 2018
@clhunsen clhunsen changed the title Rename vertex-type and edge-type constants Change/Improve values of vertex-type and edge-type constants Mar 23, 2018
@clhunsen
Copy link
Collaborator Author

clhunsen commented Apr 6, 2018

Fixed with the merge of #111.

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