Package org.neo4j.graphalgo.impl.util

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator


    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 );
    }
View Full Code Here


    {
        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 );
    }
View Full Code Here

    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 );
    }
View Full Code Here

    public void testBox()
    {
        graph.makeEdgeChain( "a,b,c,d,a" );
        NetworkDiameter<Double> diameter = new NetworkDiameter<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( diameter.getCentrality( null ) == 2.0 );
    }
View Full Code Here

    {
        graph.makeEdgeChain( "a,b,c" );
        graph.makeEdgeChain( "d,b,e" );
        NetworkDiameter<Double> diameter = new NetworkDiameter<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( diameter.getCentrality( null ) == 2.0 );
    }
View Full Code Here

    public void testChain()
    {
        graph.makeEdgeChain( "a,b,c,d,e" );
        NetworkDiameter<Double> diameter = new NetworkDiameter<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( diameter.getCentrality( null ) == 4.0 );
    }
View Full Code Here

                public Double getCost( Relationship relationship,
                    Direction direction )
                {
                    return 1.0;
                }
            }, new DoubleAdder(), new DoubleComparator(), Direction.OUTGOING,
            MyRelTypes.R1 );
        // path discovery flags
        boolean pathBD = false;
        boolean pathB2D = false;
        boolean pathBD2 = false;
View Full Code Here

                public Double getCost( Relationship relationship,
                    Direction direction )
                {
                    return 1.0;
                }
            }, new DoubleAdder(), new DoubleComparator(), Direction.OUTGOING,
            MyRelTypes.R1 );
        // path discovery flags
        boolean pathBD = false;
        boolean pathB2D = false;
        boolean pathBD2 = false;
View Full Code Here

    }

    Eccentricity<Double> getCentralityAlgorithm()
    {
        return new Eccentricity<Double>( getSingleSourceShortestPath(), 0.0,
            graph.getAllNodes(), new DoubleComparator() );
    }
View Full Code Here

                    public Double getCost( Relationship relationship,
                            Direction direction )
                    {
                        return 1.0;
                    }
                }, new DoubleAdder(), new DoubleComparator(), Direction.BOTH,
                relTypes );
    }
View Full Code Here

TOP

Related Classes of org.neo4j.graphalgo.impl.util.DoubleComparator

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.