use of org.neo4j.graphalgo.impl.centrality.NetworkRadius in project graphdb by neo4j-attic.
the class NetworkRadiusTest method testPlusShape.
@Test
public void testPlusShape() {
graph.makeEdgeChain("a,b,c");
graph.makeEdgeChain("d,b,e");
NetworkRadius<Double> radius = new NetworkRadius<Double>(getSingleSourceShortestPath(), 0.0, graph.getAllNodes(), new DoubleComparator());
assertTrue(radius.getCentrality(null) == 1.0);
}
use of org.neo4j.graphalgo.impl.centrality.NetworkRadius in project neo4j by neo4j.
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);
}
use of org.neo4j.graphalgo.impl.centrality.NetworkRadius in project neo4j by neo4j.
the class NetworkRadiusTest method testBox.
@Test
public void testBox() {
graph.makeEdgeChain("a,b,c,d,a");
NetworkRadius<Double> radius = new NetworkRadius<Double>(getSingleSourceShortestPath(), 0.0, graph.getAllNodes(), new DoubleComparator());
assertTrue(radius.getCentrality(null) == 2.0);
}
use of org.neo4j.graphalgo.impl.centrality.NetworkRadius in project neo4j by neo4j.
the class NetworkRadiusTest method testPlusShape.
@Test
public void testPlusShape() {
graph.makeEdgeChain("a,b,c");
graph.makeEdgeChain("d,b,e");
NetworkRadius<Double> radius = new NetworkRadius<Double>(getSingleSourceShortestPath(), 0.0, graph.getAllNodes(), new DoubleComparator());
assertTrue(radius.getCentrality(null) == 1.0);
}
use of org.neo4j.graphalgo.impl.centrality.NetworkRadius in project graphdb by neo4j-attic.
the class NetworkRadiusTest method testBox.
@Test
public void testBox() {
graph.makeEdgeChain("a,b,c,d,a");
NetworkRadius<Double> radius = new NetworkRadius<Double>(getSingleSourceShortestPath(), 0.0, graph.getAllNodes(), new DoubleComparator());
assertTrue(radius.getCentrality(null) == 2.0);
}
Aggregations