[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Gephi plugin doesn't stop
Page 1 of 1

Gephi plugin doesn't stop

Posted: 15 Nov 2017 17:04
by CodeIt
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

Re: Gephi plugin doesn't stop

Posted: 15 Nov 2017 17:16
by eduramiba