Commit 8a625ea6 authored by gsavin's avatar gsavin

Fix Eigenvector centrality

parent ed42f522
...@@ -1682,14 +1682,16 @@ public class Toolkit extends ...@@ -1682,14 +1682,16 @@ public class Toolkit extends
stab = Math.min(stab, 1); stab = Math.min(stab, 1);
g.addAttributeSink(layout);
r.addSink(layout); r.addSink(layout);
r.replay(g); r.replay(g);
layout.shake(); layout.shake();
layout.compute(); layout.compute();
while (layout.getStabilization() < stab) do
layout.compute(); layout.compute();
while (layout.getStabilization() < stab);
} }
/** /**
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
*/ */
package org.graphstream.algorithm.measure; package org.graphstream.algorithm.measure;
import java.util.Arrays;
import org.graphstream.graph.Edge; import org.graphstream.graph.Edge;
import org.graphstream.graph.Node; import org.graphstream.graph.Node;
import scala.actors.threadpool.Arrays;
public class EigenvectorCentrality extends AbstractCentrality { public class EigenvectorCentrality extends AbstractCentrality {
public static final int DEFAULT_MAX_ITER = 100; public static final int DEFAULT_MAX_ITER = 100;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment