Search in sources :

Example 6 with NetworkRadius

use of org.neo4j.graphalgo.impl.centrality.NetworkRadius in project graphdb by neo4j-attic.

the class NetworkRadiusTest method testChain.

@Test
public void testChain() {
    graph.makeEdgeChain("a,b,c,d,e");
    NetworkRadius<Double> radius = new NetworkRadius<Double>(getSingleSourceShortestPath(), 0.0, graph.getAllNodes(), new DoubleComparator());
    assertTrue(radius.getCentrality(null) == 2.0);
}
Also used : NetworkRadius(org.neo4j.graphalgo.impl.centrality.NetworkRadius) DoubleComparator(org.neo4j.graphalgo.impl.util.DoubleComparator) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 NetworkRadius (org.neo4j.graphalgo.impl.centrality.NetworkRadius)6 DoubleComparator (org.neo4j.graphalgo.impl.util.DoubleComparator)6