[Neo] Graph Algos

Todd Stavish todd at stavi.sh
Thu Feb 4 06:07:01 CET 2010


Hello,

When I migrated from:

<dependency>
	<groupId>org.neo4j</groupId>
	<artifactId>graph-algo</artifactId>
	<version>0.2-SNAPSHOT</version>
</dependency>

to:

<dependency>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-graph-algo</artifactId>
    <version>0.3-SNAPSHOT</version>
</dependency>
					
It gave me the following compilation errors:

NeoQuery.java:[719,35] cannot find symbol
symbol  : constructor
SingleSourceShortestPathBFS(<nulltype>,org.neo4j.api.core.Direction,com.cisco.collectiveintelligence.RelationshipTypes)
location: class org.neo4j.graphalgo.shortestpath.SingleSourceShortestPathBFS

NeoQuery.java:[736,44] getCentrality(org.neo4j.graphdb.Node) in
org.neo4j.graphalgo.centrality.ShortestPathBasedCentrality<java.lang.Double,java.lang.Integer>
cannot be applied to (org.neo4j.api.core.Node)


Looking in SVN, the constructor seems to be there, but getCentrality is gone?

Thanks,
Todd




	List<Node> nodeList = findPeopleByATopic(person,topic);
		
        // Set up shortest path algorithm.
        // Observe that we don't need to specify a start node.
        SingleSourceShortestPath<Integer> singleSourceShortestPath;
        singleSourceShortestPath = new SingleSourceShortestPathBFS(
            person,
            Direction.BOTH,
            RelationshipTypes.KNOWS);

        System.out.println("after single sorce shortest path");

        // Set up betweenness centrality algorithm.
        Set nodeSet = new HashSet(nodeList);
        BetweennessCentrality<Integer> betweennessCentrality;
        betweennessCentrality = new BetweennessCentrality<Integer>(
            singleSourceShortestPath,
            nodeSet);

        System.out.println("after betweeness centrality constructor");

        // Get centrality value for a node.
        Double value = betweennessCentrality.getCentrality(person);


More information about the User mailing list