Java Code Examples for org.neo4j.graphdb.Direction#BOTH
The following examples show how to use
org.neo4j.graphdb.Direction#BOTH .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Utils.java From graph_processing with MIT License | 5 votes |
public static SingleSourceShortestPath<Double> getSingleSourceShortestPath(RelationshipType relationshipType) { return new SingleSourceShortestPathDijkstra<Double>( 0.0, null, new CostEvaluator<Double>() { public Double getCost( Relationship relationship, Direction direction ) { return 1.0; } }, new org.neo4j.graphalgo.impl.util.DoubleAdder(), new org.neo4j.graphalgo.impl.util.DoubleComparator(), Direction.BOTH, relationshipType ); }
Example 2
Source File: DegreeCentralityTest.java From graph_processing with MIT License | 5 votes |
@Test public void shouldCalculateDegreeCentralityArrayStorageSPI() throws IOException { DegreeArrayStorageParallelSPI degree = new DegreeArrayStorageParallelSPI(db, pool, Direction.BOTH); degree.compute("Person", "ACTED_IN", 1); long id = (long) TestUtils.getPersonEntry("Tom Hanks", db).get("id"); assertTrue("outDegree Centrality calculted incorrectly", 12 == degree.getResult(id)); }
Example 3
Source File: ConnectedComponents.java From Neo4jSNA with Apache License 2.0 | 4 votes |
public ConnectedComponents() { this.componentsMap = new Long2LongOpenHashMap(); this.direction = Direction.BOTH; }
Example 4
Source File: DirectedRelationshipType.java From SciGraph with Apache License 2.0 | 4 votes |
public DirectedRelationshipType(RelationshipType type) { this(type, Direction.BOTH); }