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

Bugfix isolated nodes #296

Open
wants to merge 39 commits into
base: bridging-centrality-plugin
Choose a base branch
from

Conversation

LuisFelipeNuness
Copy link

New plugin or plugin update?

  • New Plugin
  • Update

What is the purpose of this plugin?

Generate Bridging Centrality of a Graph

How to test your plugin in Gephi?

  1. Generate nbm file and import locally in Gephi
  2. Run with different types of Graph

Checklist before submission

  • Did you merged with the master branch to get the latest updates?
  • Did you build and test the plugin successfully locally?
  • Did you include metadata (e.g. plugin author, license) in the pom.xml file
  • Did you make sure NOT to include any unecessary files in your PR?
  • Did you write unit tests to test your plugin functionalities?

public static boolean isIsolatedNode(Graph graph, Node node) {
for (Node s : graph.getNodes()) {
if (graph.isAdjacent(node, s)) {
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will provoke NOT releasing the underlying read lock and therefore hang Gephi.

The following will make sure to release the read lock as well:

NodeIterable iterable = graph.getNodes();
for (Node s : iterable) {
    if (graph.isAdjacent(node, s)) {
        iterable.doBreak();
        return false;
    }
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I made the changes as you requested, can you make a check, please? Any other suggestion?

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.

4 participants