Gephi plugin doesn't stop

Please use a mailing-list, see http://gephi.org/developers/
Post Reply
CodeIt
Posts: 9
Joined: 02 Oct 2017 07:06

Gephi plugin doesn't stop

Post by CodeIt » 15 Nov 2017 17:04

Hello,
I am writing on a plugin for Gephi in which the label of the nodes change depending on the labels of the neighbor nodes.
This should serve the clustering.
The changed labels will show in a column of the data labor. So far the code works.
As soon as the labels should not change, stop the programm should be stopped.
And here is the problem the program doesn't stop.
I use the ColumnObserver and the observer.hasColumnChanged() method. See the following code part:

public void execute(GraphModel graphModel){
Table nodeTable = graphModel.getNodeTable();

Column col = nodeTable.getColumn(prob);
if (col == null) {
col = nodeTable.addColumn(prob, String.class);
}
ColumnObserver observer = col.createColumnObserver(true);

Graph graph = graph.Model.getGraph();
Node[] nodes = graph.getNodes().toArray();
...
boolean changed = true;
while(changed){
for (Node n: nodes){
....
n.setLabel(newLabel); //here should be a method() to check the graph if a change of the labels occured
}

if (observer.hasColumnChanged()){
change = true;
}else{
change = false;
}

What could be the reason why the program does not stop.

For any help thanks in advance

User avatar
eduramiba
Gephi Code Manager
Posts: 942
Joined: 22 Mar 2010 15:30
Location: Madrid, Spain

Re: Gephi plugin doesn't stop

Post by eduramiba » 15 Nov 2017 17:16


Post Reply