Package org.neo4j.graphalgo.impl.centrality

Examples of org.neo4j.graphalgo.impl.centrality.EigenvectorCentrality


    @Test
    public void testRun()
    {
        graph.makeEdgeChain( "a,b,c,d" );
        graph.makeEdges( "b,a,c,a" );
        EigenvectorCentrality eigenvectorCentrality = getEigenvectorCentrality(
            Direction.OUTGOING, new CostEvaluator<Double>()
            {
                public Double getCost( Relationship relationship,
                            Direction direction )
                {
View Full Code Here


    @Test
    public void testDirection()
    {
        graph.makeEdgeChain( "d,c,b,a" );
        graph.makeEdges( "a,b,a,c" );
        EigenvectorCentrality eigenvectorCentrality = getEigenvectorCentrality(
            Direction.INCOMING, new CostEvaluator<Double>()
            {
                public Double getCost( Relationship relationship,
                            Direction direction )
                {
View Full Code Here

        graph.makeEdgeChain( "a,b", "cost", 1.0 );
        graph.makeEdgeChain( "b,c", "cost", 1.0 );
        graph.makeEdgeChain( "c,d", "cost", 1.0 );
        graph.makeEdgeChain( "c,b", "cost", 0.1 );
        graph.makeEdgeChain( "c,a", "cost", 0.1 );
        EigenvectorCentrality eigenvectorCentrality = getEigenvectorCentrality(
            Direction.OUTGOING, CommonEvaluators.doubleCostEvaluator( "cost" ), graph
                .getAllNodes(), graph.getAllEdges(), 0.01 );
        // eigenvectorCentrality.setMaxIterations( 100 );
        assertApproximateCentrality( eigenvectorCentrality, "a", 0.0851, 0.01 );
        assertApproximateCentrality( eigenvectorCentrality, "b", 0.244, 0.01 );
View Full Code Here

        costs.put( "a,b", 1.0 );
        costs.put( "b,c", 1.0 );
        costs.put( "c,d", 1.0 );
        costs.put( "c,b", 0.1 );
        costs.put( "c,a", 0.1 );
        EigenvectorCentrality eigenvectorCentrality = getEigenvectorCentrality(
            Direction.BOTH, new CostEvaluator<Double>()
            {
                public Double getCost( Relationship relationship,
                            Direction direction )
                {
View Full Code Here

TOP

Related Classes of org.neo4j.graphalgo.impl.centrality.EigenvectorCentrality

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.